-
Notifications
You must be signed in to change notification settings - Fork 5
Support mis-extension-ed JPEGs, skip mis-extension-ed files for exiftool #16
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
Support mis-extension-ed JPEGs, skip mis-extension-ed files for exiftool #16
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I trust you researched the change to 128 bytes, so thats fine!
I'll look at the rest!
|
Okay looks good and makes sense! Approved. |
|
Next thing to do would be to create a renaming mechanism based on |
|
One issue I've found with this: Some RAW formats (like Canon RAW) are based on TIFF formats. For real .CR2 I've made PR to add proper |

High level overview:
use native methods, display a warning
EDIT: warn only with
-vdisplay an error, skip processing - exiftool will fail either way so don't waste time for that.
I might still refactor this, but I want you to take a look. :)
Additionally we need only 96 bytes for header MIME detection. (https://github.com/dart-lang/tools/blob/main/pkgs/mime/lib/src/magic_number.dart has at most 12 HEX values (each has 2 digits) for the header matching ->
12*2*4=96). I've used 128 just in case some future MIME types would require more.