You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a huge database of photos and am trying to compare ones of the same name to discard duplicates. Some duplicates have a different orientation flag in the EXIF data, while others have already been rotated (I probably used some jpeg optimization software on them in the past which transformed for the orientation). When comparing both images that appear the same way in image viewers, a huge difference is reported because one stores the pixels in a horizontal sequence and the other in a vertical sequence.
odiff should apply the orientation flag when loading images and transform the data accordingly. I could preprocess all images that have non standard orientation, but that requires a recompression and potential loss of quality.
Seems like a trivial thing to implement and would avoid mismatches for the unaware.
The text was updated successfully, but these errors were encountered:
Found a fix which requires an extra step to use "exiftran" to losslessly rotate images in place according tot heir exif data orientation flag. Comparing works properly now.
Thanks for posting a solution. I feel like I don't really want to add this by default, because it takes time to parse and read EXIF data from jpeg files while other formats do not support it at all, and for most usecases, you don't have this issue.
For now, it will be required to manually rotate the image if you know the data might be different. If there will be more calls for this in the future we can probably implement this behind the flag but this will require a lot of effort in actually changing how we read pixels to make it truly efficient.
If you really need this please post your use case in the comments or you can also sponsor my work on this to have 100% guarantee of quick implementation https://github.com/sponsors/dmtrKovalenko
I have a huge database of photos and am trying to compare ones of the same name to discard duplicates. Some duplicates have a different orientation flag in the EXIF data, while others have already been rotated (I probably used some jpeg optimization software on them in the past which transformed for the orientation). When comparing both images that appear the same way in image viewers, a huge difference is reported because one stores the pixels in a horizontal sequence and the other in a vertical sequence.
odiff should apply the orientation flag when loading images and transform the data accordingly. I could preprocess all images that have non standard orientation, but that requires a recompression and potential loss of quality.
Seems like a trivial thing to implement and would avoid mismatches for the unaware.
The text was updated successfully, but these errors were encountered: