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
Error when parsing Olympus microscope files #65
Comments
Thanks for reporting this! You solution looks fine. Let's include some logging too: @jpeg_thumbnails = @ifds.map do |v|
if v.jpeg_interchange_format && v.jpeg_interchange_format_length
start, length = v.jpeg_interchange_format, v.jpeg_interchange_format_length
if Integer === start && Integer === length
data[start..(start + length)]
else
EXIFR.logger.warn("Non numeric JpegInterchangeFormat data")
nil
end
end
end.compact Can you make a PR? I'd like a test case with a fixture but this seems so obvious, I'll accept it without one too. |
great, I will do it tomorrow! |
fabioperrella
added a commit
to fabioperrella/exifr
that referenced
this issue
Sep 10, 2020
remvee
pushed a commit
that referenced
this issue
Sep 11, 2020
Signed-off-by: Remco van 't Veer <remco@remworks.net>
Fixed by #66 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
First of all, thanks for all your work with that gem!
We found an error when parsing files from Olympus microscope (I'm not 100% sure about that orign, more details below).
An example:
For this file, I run
exiftool
and got this output:The error is raised because the
start
is not an integer at this point:I noticed that exiftool also warns about that:
At this moment, I can't share the file that I used to test, because I got it from the production server and it belongs to a customer. I'm trying to ask for permission to use it as a fixture.
Would it be possible to change something to avoid raising this error?
Maybe detecting that it's not a number and skipping like this:
The text was updated successfully, but these errors were encountered: