Closed fabioperrella closed 4 years ago
I did the same approach that I did in https://github.com/WeTransfer/format_parser/issues/155#issuecomment-675677078 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
command:
$ 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 https://github.com/remvee/exifr/issues/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.
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.