JPEGImage(<filename>) hangs

Chris Green cl at isbd.net
Thu Sep 27 14:07:59 EDT 2018


I have a program which uses jpegtran-cffi 0.5.2 and, while it seems to
work OK most of the time it's hanging very solidly on one jpeg file
which seems to be OK when viewed with other programs.

I'm simply doing:-

    img = JPEGImage(srcFullFn)

I have checked that that srcFullFn points to a real jpeg file and I
have checked that it's actually a jpeg:-

    chris$ file 102_PANA/P1020466.JPG
    102_PANA/P1020466.JPG: JPEG image data, Exif standard: [TIFF image
    data, little-endian, direntries=15, manufacturer=Panasonic,
    model=DMC-TZ60, orientation=upper-left, xresolution=214,
    yresolution=222, resolutionunit=2, software=Ver.1.0  ,
    datetime=2018:09:26 10:55:31], baseline, precision 8, 4896x3672,
    frames 3

Even running in the Python console hangs:-

    chris$ python
    Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34) 
    [GCC 7.3.0] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from jpegtran import JPEGImage
    >>> x = JPEGImage("102_PANA/P1020466.JPG")

...  and that's it, CTRL/C and CTRL/Z won't break it, I have to 'kill -9' the process

Does anyone have any idea what may be wrong?

-- 
Chris Green
·



More information about the Python-list mailing list