-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
exif get lost during image upload #1175
Comments
This is natural. Shrinking means that a thumbnail image is generated which overrides the original one. To keep EXIF data do not use shrinking but enforce maximum dimensions using validation constraints of the upload field instead. |
I do not agree. Normally in image rezising in photo software the exif is not deleted. If I am looking here I do wonder if this is related to my issue: There should be a way to keep the exif data inside the image. |
The only way to keep EXIF data would be resizing the original image instead of creating a new thumbnail image. But this would cause distortion again if the original image does not meet the destination dimension's ratio. |
Seems you did not understand my comment above: we are not doing a resize, but create a new thumbnail image which replaces the original image. |
I have not recognized your comment early enough. Now I have updated my question there. What I do not understand, why a resize is disorting the file. |
Because a resize is a rather "dumb" operation. It does not know adaption modes like INSET or OUTBOUND... it just changes the image's dimensions even if that means the image ratio will be different. It is similar as if you open a 2000x1000 pixel image in a graphics program and resize it to 500x800. |
Actually the shrinking was a resize earlier and we recently changed it to thumbnail creation because the images were distorted at your site ;-) |
As I just wrote at Stack Overflow I could imagine copying EXIF data from the original image to the created thumbnail image - if that is somehow possible. |
mmh, I remember. So my workaround must be a max hight and width. But for this case I should be able to switch off the shrink option. My target is to have the exif data on the detail view. |
https://github.com/avalanche123/Imagine/blob/c199c3ae08cff7178c95a12ccf5ba64f043d3264/lib/Imagine/Imagick/Image.php#L67 Might be in this test is a solution? |
Why not using This would need a modified image setting in the generated modul: |
From a conversation with Symfony guys:
Closing as won't fix. In case somebody comes up with a solution at Stack Overflow I would be willing to reopen though. |
Why not storing the original exif data in the myImageMeta somehow? |
Worth a try |
Great! How to use it in a template? |
As a start try:
|
Expected behavior
the uploaded images should have the exif information of the original image (jpg)
Actual behavior
with shrinking enabled the exif data is not available anymore
Steps to reproduce
upload a jpg with exif information included via a most modul where shrinking is enabled. afterwards download the image from the display page where you opened the file for complete view. Countercheck the exif. They are empty.
If this involves a rather complex scenario maybe attach the
.mostapp
model file.The text was updated successfully, but these errors were encountered: