Page 1 of 1
possible bug resizing a tiff file
Posted: 2018-07-29T16:11:50-07:00
by fmw42
Using ImageMagick 6.9.10.8 and 7.0.8.8 on Mac OSX Sierra, I have a layered tiff that resizes OK, but then does not look correct in Photoshop 19.1.5. In PS, only the top left corner seems to display whereas in IM and Mac PREVIEW, I see the whole file.
This was tested from the following post --
viewtopic.php?f=1&t=34465 -- that first raised the issue.
Original TIFF:
http://www.fmwconcepts.com/misc_tests/t ... iginal.tif
I have tried variations of the following two commands in both IM 6 and IM 7 and get the same results.
Code: Select all
convert Original.tif[0] -resize 410x426 fred_new2_6.tif
convert Original.tif -coalesce -resize 410x426 -layers merge +repage fred_new2_6.tif
The result is:
http://www.fmwconcepts.com/misc_tests/t ... new2_6.tif
When I open them in PS and take screen snaps, I get the following:
Original:
Resized:
I am not sure if this is due to a corrupt TIF or IM is not writing the correct file information about size to where PS needs it.
Re: possible bug resizing a tiff file
Posted: 2018-07-29T16:57:41-07:00
by snibgo
I think there is a problem in Original.tif, or in the way IM reads it. Note that...
Code: Select all
convert Original.tif[0] -resize 410x426 fred_new2_6.tif
... should make a single image because of [0] but the output has three images.
Re: possible bug resizing a tiff file
Posted: 2018-07-29T16:59:28-07:00
by fmw42
With that command, I only got one output image on my Mac OSX Sierra and IM 6.9.10.8.
Re: possible bug resizing a tiff file
Posted: 2018-07-29T17:13:52-07:00
by fmw42
Additional information. After resizing with
Code: Select all
convert Original.tif -layers merge +repage -resize 410x426 result2.tif
when I open the file in PS, it still have two layers. The first is mostly transparent but contains the logo. The second is the object part.
So the OP's original comment about not merging the layers is true.
The same happens with -flatten.
Re: possible bug resizing a tiff file
Posted: 2018-07-29T17:15:56-07:00
by fmw42
If I remove the first mostly transparent layer from the image in PS and save it, the after resizing in IM and opening it again in PS, it shows the full image.
Re: possible bug resizing a tiff file
Posted: 2018-07-29T18:27:06-07:00
by snibgo
For me, v7.0.7-28 on Windows 8.1, IM is confused by the input file. Here, I've renamed Original.tif to be rotor.tif.
The following works fine:
Code: Select all
f:\web\im>%IMG7%magick identify rotor.tif
rotor.tif[0] TIFF 1330x1380 1330x1380+0+0 8-bit CMYK 8169170B 0.125u 0:00.312
rotor.tif[1] TIFF 1330x1380 1330x1380+0+0 8-bit CMYK 0.000u 0:00.016
rotor.tif[2] TIFF 276x323 276x323+199+407 8-bit CMYK 0.000u 0:00.016
f:\web\im>%IMG7%magick identify rotor.tif[0]
rotor.tif[0]=>rotor.tif TIFF 1330x1380 1330x1380+0+0 8-bit CMYK 8169170B 0.078u
0:00.078
f:\web\im>%IMG7%magick rotor.tif[0] info:
rotor.tif[0] TIFF 1330x1380 1330x1380+0+0 8-bit ColorSeparation CMYK 8169170B 0.
156u 0:00.296
Okay so far. But when we convert rotor.tif[0]:
Code: Select all
f:\web\im>%IMG7%magick rotor.tif[0] x.tiff
f:\web\im>%IMG7%magick identify x.tiff
x.tiff[0] TIFF 1330x1380 1330x1380+0+0 8-bit CMYK 9.52169MiB 0.063u 0:00.062
x.tiff[1] TIFF 1330x1380 1330x1380+0+0 8-bit CMYK 0.000u 0:00.000
x.tiff[2] TIFF 276x323 276x323+199+407 8-bit CMYK 0.000u 0:00.000
[1] and [2] work okay, but not [0].
Re: possible bug resizing a tiff file
Posted: 2018-07-29T18:42:57-07:00
by fmw42
Yes, I get the same thing. IM will not select layers in TIFF files. I think IM cannot handle layer tiffs, only multipage tiffs.
I had submitted a bug report about layer tif handling a long time ago. I guess it has not yet been worked on.
Re: possible bug resizing a tiff file
Posted: 2018-07-29T18:46:57-07:00
by fmw42
I do not know if layered tiffs have a flattened layer like PSD files. But ignoring the flattened layer [0] and merging seems to work for me.
convert original.tif[1-2] -layers merge +repage -resize 410x426 result.tif
When I open result.tif in PS, it looks fine and has only one layer.