Support mis-extension-ed JPEGs, skip mis-extension-ed files for exiftool #16
Merged
Xentraxx merged 7 commits intoXentraxx:v4.0.3-developmentfrom May 28, 2025
Merged
Conversation
Author
Xentraxx
approved these changes
May 28, 2025
Owner
|
Okay looks good and makes sense! Approved. |
Author
|
Next thing to do would be to create a renaming mechanism based on |
Author
|
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 |
This was referenced May 30, 2025
Closed
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.