read offset for width/height reading correctly

main
josch 11 years ago
parent 2e9ac9ec1e
commit 25a2178444

@ -105,7 +105,8 @@ def main(images, dpi, title=None, author=None, creator=None, producer=None,
exit(1)
# image is jpeg2000
imgformat = "JP2"
im.seek(48)
offset, = struct.unpack(">I", im.read(4))
im.seek(28+offset)
height, width = struct.unpack(">II", im.read(8))
if colorspace:
color = colorspace

Loading…
Cancel
Save