-
Notifications
You must be signed in to change notification settings - Fork 19
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
TypeError in JpegParser when calling EXIFR::TIFF #157
Comments
I did the same approach that I did in #155 (comment) and I could reproduce the same error as the original file! Now the converted file has only 3.4KB and can't be peviewed because I removed the content of it! But even this way it returns all the metadata when I run the $ file file.jpg
file.jpg: JPEG image data, JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, Exif Standard: [TIFF image data, little-endian, direntries=9, manufacturer=Olympus, model=DP21, orientation=upper-left, xresolution=8, yresolution=16, resolutionunit=2, datetime=2020:03:11 15:11:47] And also returns the same error when running format_parser! I attached the file so you can see: @julik @martijnvermaat wdyt using this file as a fixture? |
@linkyndy now that you are back, could you give your feedback about it pls ☝️ |
If the file no longer has image data it should be OK, but if it is 3.4KB then it might still include a thumbnail in the EXIF tags. It is also possible that this is why parsing fails (parsing this thumbnail) I did notice this happening with a JPEG from an electronic microscope for example |
ok I will try to remove these tags! Actually, I'm almost sure this is a picture from a microscope |
In the end, I think something will need to be fixed in exifr gem, so I opened an issue there remvee/exifr#65 I still haven't been able to create a fake file or remove all the content to use as a fixture yet. I'm trying.. I talked with the support team trying to get permission from the owner of the file to use it as a fixture. |
Closes #157 related to remvee/exifr#66 Before this update: ```bash $ exe/format_parser_inspect broken_thumbnails.jpg Traceback (most recent call last): 30: from exe/format_parser_inspect:22:in `<main>' 29: from exe/format_parser_inspect:22:in `map' 28: from exe/format_parser_inspect:24:in `block in <main>' 27: from exe/format_parser_inspect:24:in `public_send' 26: from /Users/fabioperrella/projects/format_parser/lib/format_parser.rb:105:in `parse_file_at' 25: from /Users/fabioperrella/projects/format_parser/lib/format_parser.rb:105:in `open' 24: from /Users/fabioperrella/projects/format_parser/lib/format_parser.rb:106:in `block in parse_file_at' 23: from /Users/fabioperrella/projects/format_parser/lib/format_parser.rb:174:in `parse' ... ``` After this update: ```bash $ exe/format_parser_inspect broken_thumbnails.jpg [ { "source_path_or_url": "broken_thumbnails.jpg", "options": { "results": "first" }, "result": { "nature": "image", "format": "jpg", "width_px": 1600, "height_px": 1200, "display_width_px": 1600, "display_height_px": 1200, "has_multiple_frames": null, "orientation": "top_left", "has_transparency": null, "color_mode": null, ... ```
I found some files which raise an error like the following:
The same file is considered valid for the linux command
file
:If I try to parse direct using the gem
exifr
, it also raises an error:So, I think there is some problem inside the gem
exifr
to parse it.The file that I tested is not mine and I need permission to use it as a fixture, so I'm waiting for it because I can't create a similar file to reproduce it.
The text was updated successfully, but these errors were encountered: