-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Use PNG EXIF data to mirror json argument data #72
Comments
cv2 imwrite / imencode do not appear to support EXIF data, need a workaround |
Support for image metadata is not nearly as widespread as I expected! The best option I've found for EXIF so far is:
piexif is in the process of transitioning to a new maintainer, and it looks like they could use some assistance/encouragement in getting things up and running: https://github.com/JEFuller/Piexif/projects/1 |
@keturn - thanks for the tip! I really want to avoid using PIL to do any of the image encoding, serialization, or disk io because in my testing the performance of nearly every function in PIL is extremely bad. It's bad enough that I would hold off until I can find another way to have cv2 write EXIF metadata... |
That bad? I would have assumed that PIL.Image.save ends up being a fairly thin wrapper between the byte array supplied by numpy to a platform-native image encoding library. |
It's the encoding for formats like PNG that really kill the performance. I'm sure if you were saving something like bmp or other uncompressed it might not be as bad. Bear in mind that I have users saving files that are upwards of 16384x16384 in some cases... |
This better attaches the generation parameters to the actual output image file.
Any code that reads the separated JSON files should be updated to instead pull data from this field, if it is present.
This data should be set in the encoded PNG bytes sent to the GRPC server for ad-hoc protocol extensions.
The text was updated successfully, but these errors were encountered: