What is correct behaviour for JPG thumbnail of PSD file with alpha channels

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
usemagi
Posts: 12
Joined: 2019-05-21T01:06:38-07:00
Authentication code: 1152

What is correct behaviour for JPG thumbnail of PSD file with alpha channels

Post by usemagi » 2019-06-05T02:56:13-07:00

In newest version of Image Magick such thumbnail is generated:
http://i.piccy.info/i9/96342732c87aa8c0 ... 131res.jpg

on previous version (ImageMagick 7.0.8-14) it was:
http://i.piccy.info/i9/db0a3e7cd5493627 ... 901res.jpg

So what is correct bahaviour in terms of processing PSD files with alpha channel?

Thanks

File:
https://drive.google.com/file/d/1Au-CSK ... jWqWG/view

User avatar
fmw42
Posts: 25664
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: What is correct behaviour for JPG thumbnail of PSD file with alpha channels

Post by fmw42 » 2019-06-05T09:35:55-07:00

Imagemagick has never been able to handle extra (alpha) channels. Also your PSD file references fonts that I do not have on my system.

Please show your exact command line and your exact current version to compare to 7.0.8.14

For me, IM 6.9.10.48 and IM 7 0.8.48 (Mac OSX Sierra) produce the same results with a red background that looks like what I see in PS. But IM 7.0.8.14 shows no red background.

Code: Select all

convert 02_alpha-channels.psd[0] img6.png
magick 02_alpha-channels.psd[0] img7.png
Same when I include -thumbnail 100%

What do you expect/get from the same commands?

usemagi
Posts: 12
Joined: 2019-05-21T01:06:38-07:00
Authentication code: 1152

Re: What is correct behaviour for JPG thumbnail of PSD file with alpha channels

Post by usemagi » 2019-06-07T02:43:01-07:00

Thank you

I used Magick.NET, but I assume it does something like this(can't check since I can't find old binaries of 7.0.8-14):

Code: Select all

magick convert "02_alpha-channels.psd" -flatten -thumbnail 300x300 out.jpg
What I expect? I just don't understand - it was a fixed bug or its a new bug. I assume since PS gives same result as new version - new version just fixed a bug.

User avatar
fmw42
Posts: 25664
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: What is correct behaviour for JPG thumbnail of PSD file with alpha channels

Post by fmw42 » 2019-06-07T09:14:21-07:00

In IM 7, use magick, not magick convert. Try

Code: Select all

magick "02_alpha-channels.psd[0]" -thumbnail 300x300 out.jpg
The first layer of a PSD file is the flattened layer.

Post Reply