Line 150 of jpginfo.py contains a break statement that
causes the while loop to abort once IPTC data is found.
The problem with this break statement is that the IPTC
data may well come before the encoding and dimensions
information in the file, with the result that some
mmpython will never parse that information for some jpg
files. For a simple, reproduceable case, create a
simple picture in Photoshop CS and save it twice, once
using the "Save for web" option and the other using the
"Save as" option. When you parse these two files, you
should find that mmpython successfully extracts the
height and width from the former, but not the latter.
If you comment out the break statement on line 150 of
jpginfo.py, then mmpython should extract the height and
width successfully from both files. I assume that break
statement was added for a good reason, so I'm not sure
if there are repercussions to simply eliminating it.
Log in to post a comment.