FIX: New versions of FreeImage report software as "I", not "ImageMagick ..." #822
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.
This should close both #820 and #730.
It was a bit interesting. It appears some versions of FreeImage - older ones, apparently - reported
('EXIF_MAIN', 'Software')
as"ImageMagick [date] [version number] [other stuff]". The old version available through my Enterprise Linux derivative's package manager did this - though it was broken in other ways for being so out of date. Thus, we just checked for the string to start with
"ImageMagick"`.After removing that version of FreeImage, I went and compiled an entirely fresh install from source. And now I can reproduce the errors reported in #820 and #730. New versions of FreeImage are reporting
('EXIF_MAIN', 'Software')
as the single character'I'
.The fix is simple and backwards compatible, just change the test to
.startswith('I')
, and should be credited to @rovitotv.I also made a couple minor PEP8 improvements.