possible bug IM 7 extracting TIFF layer.

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

possible bug IM 7 extracting TIFF layer.

Post by fmw42 »

Using IM 7.0.8.24 Q16 Mac OSX, I can extract all the layers of the a TIFF file fine in one command. But when I try to extract a given layer, it comes out black.

Input TIFF:
http://www.fmwconcepts.com/misc_tests/t ... stfile.tif

Code: Select all

magick testfile.tif testfile_%d.png
Image

Image

Image


Code: Select all

magick testfile.tif[2] testfile7_2.png
Image


In IM 6.9.10.24 Q16 Mac OSX, the last command works fine

Code: Select all

convert testfile.tif[2] testfile6_2.png
Image
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: possible bug IM 7 extracting TIFF layer.

Post by magick »

Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ https://www.imagemagick.org/download/beta/ by sometime tomorrow.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug IM 7 extracting TIFF layer.

Post by fmw42 »

Thanks. This seems to be fixed in IM 7.0.8.25 beta.
banisco
Posts: 10
Joined: 2016-08-12T15:31:12-07:00
Authentication code: 1151

Re: possible bug IM 7 extracting TIFF layer.

Post by banisco »

I'm having the same exact problem, except with Photoshop PSD files. If I tell it to extract all layers to PNG, I get the individual layer images, but if I target a specific layer it renders black.

I tested both 7.0.8-32 and latest 7.0.8-39 64-bit releases on Windows 10 (ImageMagick-7.0.8-32-Q16-x64-dll and ImageMagick-7.0.8-39-Q16-x64-dll.exe); rolling back to ImageMagick-7.0.8-14 works.

Has the beta code been merged in yet, or is this a separate issue?
banisco
Posts: 10
Joined: 2016-08-12T15:31:12-07:00
Authentication code: 1151

Re: possible bug IM 7 extracting TIFF layer.

Post by banisco »

Photoshop PSD file:
https://www.dropbox.com/s/3h0d0q1aslr1m ... oolong.psd

Composite (layer 0):
https://www.dropbox.com/s/dyobhg1rhf4qj ... 0.8.14.png

Layer 9 (7.0.8.30/32/39/40 beta) - broken?
https://www.dropbox.com/s/f026ic3rwcisq ... 0.8.32.png

Layer 9 (7.0.8.14) - works
https://www.dropbox.com/s/uzqavw5mgmc9l ... 0.8.14.png

Code: Select all

magick move_oolong.psd[9] -define colorspace:auto-grayscale=off -define png:format=png32 move_oolong.png
 
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug IM 7 extracting TIFF layer.

Post by fmw42 »

In the future, start a new topic. Do not tack onto an old one, especially for a a different issue.

Photoshop does not show that many layers. I am not sure why ImageMagick identifies

Code: Select all

move_oolong.psd[1] PSD 4513x6013 4513x6013+0+0 8-bit sRGB 0.000u 0:00.002
move_oolong.psd[2] PSD 3355x574 3355x574+548+4192 8-bit sRGB 0.000u 0:00.001
move_oolong.psd[3] PSD 2694x2433 2694x2433+1177+1623 8-bit sRGB 0.000u 0:00.001
move_oolong.psd[4] PSD 1023x682 1023x682+1708+1359 8-bit sRGB 0.000u 0:00.001
move_oolong.psd[5] PSD 910x570 910x570+1764+1415 8-bit sRGB 0.000u 0:00.001
move_oolong.psd[6] PSD 1564x546 1564x546+1454+3102 8-bit sRGB 0.000u 0:00.001
move_oolong.psd[7] PSD 1864x545 1864x545+1303+2360 8-bit sRGB 0.000u 0:00.001
move_oolong.psd[8] PSD 4060x1408 4060x1408+184+667 8-bit sRGB 0.000u 0:00.001
move_oolong.psd[9] PSD 4060x4099 4060x4099+184+667 8-bit sRGB 0.000u 0:00.001
However, ImageMagick is limited in what it can do with non-simple layers (that is selections, masks, adjustments).

The proper way to specify 32-bits for PNG would be

Code: Select all

magick move_oolong.psd[9] PNG32:move_oolong9.png
But that still gives me a black image with IM 7.0.8.39 Q16 Mac OSX. I do get all the layers without the layer id when converting to png, same as you did.

However, the same command works fine in IM 6.9.10.39 Q16 Mac OSX. So it appears to be a bug in IM 7 only.

This will need to be reviewed by the ImageMagick developers.
banisco
Posts: 10
Joined: 2016-08-12T15:31:12-07:00
Authentication code: 1151

Re: possible bug IM 7 extracting TIFF layer.

Post by banisco »

Apologies for tacking onto the thread - the symptoms were the same so I thought it was relevant.

And thanks for pointing out my incorrect PNG output syntax.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug IM 7 extracting TIFF layer.

Post by fmw42 »

It is perfectly fine to open a new topic and then reference an older one that might be similar or related. Once a topic is closed, new topics should be created. Not a problem this time. I have notified the developers of the issue.
Post Reply