Page 1 of 1

crash with "new JPEG in TIF" file in 6.6.4-2-Q16

Posted: 2010-09-15T03:37:34-07:00
by tilman
Hello,

convert crash.tif test.pbm

crashes with 6.6.4-2-Q16 on XP, this is a "new JPEG in TIF" format.
It worked fine with 6.6.3-7-Q16. This happens also with imdisplay.

The file is here:
http://ul.to/j23pbi

Tilman Hausherr

Re: crash with "new JPEG in TIF" file in 6.6.4-2-Q16

Posted: 2010-09-15T09:57:12-07:00
by fmw42
I think your file may be corrupted or have some special "feature" as I cannot open it with other tools on my Mac such as Preview. Photoshop opens it. In one tool I get an error message that it cannot handle compression 7.

Exiftool says:


exiftool -s -ee -g1 -u -n -D crash.tif
---- ExifTool ----
- ExifToolVersion : 8.24
---- System ----
- FileName : crash.tif
- Directory : .
- FileSize : 129192
- FileModifyDate : 2010:09:15 03:36:07-07:00
- FilePermissions : 644
---- File ----
- FileType : TIFF
- MIMEType : image/tiff
- ExifByteOrder : II
---- IFD0 ----
254 SubfileType : 0
256 ImageWidth : 1656
257 ImageHeight : 2320
258 BitsPerSample : 8 8 8
259 Compression : 7
262 PhotometricInterpretation : 6
273 StripOffsets : 768
274 Orientation : 1
277 SamplesPerPixel : 3
278 RowsPerStrip : 2320
279 StripByteCounts : 128424
282 XResolution : 200
283 YResolution : 200
284 PlanarConfiguration : 1
296 ResolutionUnit : 2
305 Software : Kofax standard Multi-Page TIFF Storage Filter v3.03.000
306 ModifyDate : 2010:09:15 11:33:17
513 OtherImageStart : 768
33000 Exif_0x80e8 : 0
---- Composite ----
- ImageSize : 1656x2320


Tiff compression 7 is JPEG ('new-style' JPEG).

Perhaps it is not creating compression 7 correctly?

P.S. I don't really know, but perhaps there is some connection between this bug report and viewtopic.php?f=3&t=17065#p63446

Re: crash with "new JPEG in TIF" file in 6.6.4-2-Q16

Posted: 2010-09-15T10:13:36-07:00
by tilman
fmw42 wrote:I think your file may be corrupted or have some special "feature" as I cannot open it with other tools on my Mac such as Preview. Photoshop opens it. In one tool I get an error message that it cannot handle compression 7.
Many tools have trouble displaying JPEG in TIFF .tif files. Some can't handle the new format, some can't handle the old format. The XP viewer can't do the new format. The W7 viewer can do both most of the times. The only tool that has handled everything in more than a decade is IrfanView. And yes, my file is compression 7.
fmw42 wrote:P.S. I don't really know, but perhaps there is some connection between this bug report and viewtopic.php?f=3&t=17065#p63446
Yes, there is definitively a connection. The author is the same :-)

Tilman Hausherr

Re: crash with "new JPEG in TIF" file in 6.6.4-2-Q16

Posted: 2010-09-15T10:15:54-07:00
by fmw42
Yes, there is definitively a connection. The author is the same
Sorry Tilman, I had not noticed. :oops: But hopefully this also will be fixed then in 6.6.4.3

Re: crash with "new JPEG in TIF" file in 6.6.4-2-Q16

Posted: 2010-09-15T19:36:21-07:00
by Drarakel
The main problem (the image is not readable) could be a libtiff issue.(?)
But the crash in ImageMagick probably should be fixed, yes..

Some additional details:
The crash in Windows happens in the JPG module (core_rl_jpeg_.dll).
And my (rather old) standalone version of libtiff reports these errors (apart from the 'unknown tags' warnings):

Code: Select all

JPEGLib: Warning, Application transferred too many scanlines.
crash.TIF: Error, can't read strip 0.
Maybe someone can check it with a new libtiff version?

Perhaps a missing YCbCrSubSampling tag causes this crash. (Would be strange though, as there are YCbCr images without a correct tag that can get read in IM - with just a warning IIRC. But these were Old JPG in TIFFs, I think..)
Anyway, the above file uses 2x2 subsampling. And when the YCbCrSubSampling tag is added, the crash in IM is gone. Take this version with modified tags:
nocrash.TIF (Link deleted)
But even then, the image can't be read with IM/libtiff (one gets a black image). The IM error message then says:

Code: Select all

Magick: fractional scanline not read. `crash3.TIF' @ warning/tiff.c/TIFFWarnings/704.
Maybe libtiff doesn't treat correctly the 2x2 subsampling in TIFF and treats it somehow as if it had no (=1x1) subsampling? But that's just speculation..

Re: crash with "new JPEG in TIF" file in 6.6.4-2-Q16

Posted: 2010-09-16T01:55:00-07:00
by tilman
Bug is fixed in the 6.6.4-3 beta version (static build). Thanks!