Page 1 of 1

TIF conversion fails (CompressNotSupported)

Posted: 2010-07-21T09:33:29-07:00
by curelc
Hi,

I have to say I am a beginner using this sort of tools.

I have this particular TIFF image that won't convert. The simple command

Code: Select all

convert.exe "test.tif" "out.jpg"
will throw this (among other things):

convert.exe: Photometric tag value assumed incorrect, assuming data is YCbCr instead of RGB. `TIFFReadDirectory' @ tiff.c/TIFFWarnings/526.
convert.exe: CompressNotSupported `c:\test\_imgMagick\MTS-1623\test.tif' @ tiff.c/ReadTIFFImage/810.

Using identify, I get things like:
identify: A99912q.tif: wrong data type 4 for "JpegProc"; tag ignored. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/704.
identify: Photometric tag value assumed incorrect, assuming data is YCbCr instead of RGB. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/704.
identify: Subsampling tag is not set, yet subsampling inside JPEG data [1,1] does not match default values [2,2]; assuming subsampling inside JPEG data is correct. `OJPEGSubsamplingCorrect' @ warning/tiff.c/TIFFWarnings/704.
identify: Depreciated and troublesome old-style JPEG compression mode, please convert to new-style JPEG compression and notify vendor of writing software. `OJPEGSetupDecode' @ warning/tiff.c/TIFFWarnings/704.


Adobe PS can't open this image, Windows Picture Viewer can't open it either. IrfanView does open it and can also save it as JPEG.


My question is - Is the "CompressNotSupported" message the main reason for failure? What I am trying to determine is if ImageMagick could do something in cases like this or not.

Not sure if the above is enough but I can't share the image just yet.

Thanks a lot
Cristian

Re: TIF conversion fails (CompressNotSupported)

Posted: 2010-07-21T09:40:25-07:00
by snibgo
If "identify -verbose test.tif" gives anything other than errors and warnings, you might post that. But it just seems like a very dodgy tiff file. If it's a one-off and you can use another program to convert it, fine. If it happens often, you might find where they come from and get the errors corrected.

Re: TIF conversion fails (CompressNotSupported)

Posted: 2010-07-21T11:33:30-07:00
by fmw42
can you post a link to your image, so others can try downloading and testing it?

Re: TIF conversion fails (CompressNotSupported)

Posted: 2010-07-21T14:39:33-07:00
by curelc
The output of identify -verbose is this:

Image: A99912q.tif
Format: TIFF (Tagged Image File Format)
Class: DirectClass
Geometry: 1872x1108+0+0
Resolution: 300x300
Print size: 6.24x3.69333
Units: PixelsPerInch
Type: TrueColor
Base type: TrueColor
Endianess: MSB
Colorspace: RGB
Depth: 8-bit
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
Channel statistics:
Red:
min: 0 (0)
max: 255 (1)
mean: 217.167 (0.851635)
standard deviation: 73.4465 (0.288025)
kurtosis: 2.38908
skewness: -1.95565
Green:
min: 0 (0)
max: 255 (1)
mean: 217.664 (0.853585)
standard deviation: 73.0298 (0.286391)
kurtosis: 2.44329
skewness: -1.96835
Blue:
min: 0 (0)
max: 255 (1)
mean: 215.436 (0.844848)
standard deviation: 74.6576 (0.292775)
kurtosis: 2.20245
skewness: -1.91011
Image statistics:
Overall:
min: 0 (0)
max: 255 (1)
mean: 162.567 (0.637517)
standard deviation: 113.514 (0.445152)
kurtosis: -1.52671
skewness: -0.599182
Rendering intent: Undefined
Interlace: None
Background color: white
Border color: rgb(223,223,223)
Matte color: grey74
Transparent color: black
Compose: Over
Page geometry: 1872x1108+0+0
Dispose: Undefined
Iterations: 0
Compression: JPEG
Orientation: TopLeft
Properties:
date:create: 2010-07-14T14:20:37-04:00
date:modify: 2010-07-14T14:20:38-04:00
signature: eaa731e14ecf2b8ed700daa6cf5fbccf3e5f4a13210afce433809117aedb5cc3
tiff:endian: lsb
tiff:photometric: unknown
tiff:rows-per-strip: 1108
tiff:software: Pixel Translations Inc., PIXTIFF Version 58.3.218.475
Artifacts:
verbose: true
Tainted: False
Filesize: 240KB
Number pixels: 2.074M
Pixels per second: 22.07M
User time: 0.094u
Elapsed time: 0:01.093
Version: ImageMagick 6.6.3-0 2010-07-01 Q16 http://www.imagemagick.org
identify: A99912q.tif: wrong data type 4 for "JpegProc"; tag ignored. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/704.
identify: Photometric tag value assumed incorrect, assuming data is YCbCr instead of RGB. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/704.
identify: Subsampling tag is not set, yet subsampling inside JPEG data [1,1] does not match default values [2,2]; assuming subsampling inside JPEG data is correct. `OJPEGSubsamplingCorrect' @ warning/tiff.c/TIFFWarnings/704.
identify: Depreciated and troublesome old-style JPEG compression mode, please convert to new-style JPEG compression and notify vendor of writing software. `OJPEGSetupDecode' @ warning/tiff.c/TIFFWarnings/704.

I'll provide the image as soon as I can. It may not be just one off so I am interested if IM could convert it or what is the main reason it can't according to the output above.

Thanks
Cristian

Re: TIF conversion fails (CompressNotSupported)

Posted: 2010-07-21T15:18:55-07:00
by Drarakel
Strange - as identify seems to be able to decode it, while convert is not.(?)
It's an 'Old JPEG in TIFF' file and some tools have trouble with that. (Some people even have trouble in ImageMagick - see e.g. here: viewtopic.php?f=3&t=16155 ) Additionally, there seem to be wrong tags in your file. But still, strange..

Re: TIF conversion fails (CompressNotSupported)

Posted: 2010-08-13T13:41:34-07:00
by curelc
Now I have the file but is there a way to upload an image to this forum or I have to provide a "link"?

Thanks

Re: TIF conversion fails (CompressNotSupported)

Posted: 2010-08-13T18:14:42-07:00
by fmw42
You have to provide a link.

Re: TIF conversion fails (CompressNotSupported)

Posted: 2010-08-17T08:40:53-07:00
by curelc
And finally, here is the link to the image ...

ftp://ftp.emc.com/outgoing/35702736/A99912q.tif

If you can, please let me know if you think there is something terribly wrong with this file or if ImageMagick could/should process it.

Thanks again,
Cristian

Re: TIF conversion fails (CompressNotSupported)

Posted: 2010-08-17T10:08:52-07:00
by fmw42
IM 6.6.3.7 Q16 (HDRI) Mac OSX Tiger.

It complains, but converts fine and can be opened. What version of IM are you using? If old, try upgrading.


convert A99912q.tif A99912q.jpg

convert: A99912q.tif: wrong data type 4 for "JpegProc"; tag ignored. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/704.
convert: Photometric tag value assumed incorrect, assuming data is YCbCr instead of RGB. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/704.
convert: Subsampling tag is not set, yet subsampling inside JPEG data [1,1] does not match default values [2,2]; assuming subsampling inside JPEG data is correct. `OJPEGSubsamplingCorrect' @ warning/tiff.c/TIFFWarnings/704.
convert: Depreciated and troublesome old-style JPEG compression mode, please convert to new-style JPEG compression and notify vendor of writing software. `OJPEGSetupDecode' @ warning/tiff.c/TIFFWarnings/704.

Re: TIF conversion fails (CompressNotSupported)

Posted: 2010-08-17T12:47:30-07:00
by curelc
Indeed the latest version works (6.6.3-7).
Not sure if my previous post made it, where I was saying that I had previously tried 6.6.3.

THANK YOU!