-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] Expose onBeforeWriteToDisk
hook (to manipulate EXIF data)
#332
Comments
Edit: this library requires another one to be installed top level. So this is a no go. What about https://github.com/hometlt/png-metadata or https://github.com/kujirahand/node-png-metadata? it's not really about exif data but other kind of metadata. It only works for PNG but |
If that's something we want to do, I can propose a PR |
I look a bit into it, and manipulate EXIF can be tricky: there is plenty we can do and I don't think there is much we'd like to do from the One thing we could do is expose a hook for just before writing a file to the FS: type OnBeforeWriteToDisk = (arguments: {
buffer: Buffer; testPath: string; destination: string; /* others */
}) => Buffer So that people could be free to do what they want with it, and while keeping the full control on how to write to disk |
onBeforeWriteToDisk
hook (to manipulate EXIF data)
I opened #337 to solve this |
At the moment, any test can generate any snapshot, and it's really hard to be able to find which test generated which image (as we can provide custom paths for the images, we cannot just rely on the path of the images, and also if we have 2 tests files in the same folder, images can be put in the same folder).
We could use EXIF data in images to store metadata in them (and we could also add the possibility in
.toMatchImageSnapshot()
to provide extra EXIF data if we want too), like the test suite (with the describe / it), the test path etc.The text was updated successfully, but these errors were encountered: