Resizing with convert removes channels from psd

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
ddp
Posts: 3
Joined: 2015-04-18T21:50:03-07:00
Authentication code: 6789

Resizing with convert removes channels from psd

Post by ddp »

Hi there,

I'm using the convert commande to resize psd files. The source psd file has RGB channels, but the colors used by the artist are only nuances of gray. When the file gets resized, the RGB channels are gone and the Grey channel appears appears.

If I add a bit of any color (other than gray) in the source file, the resized file will keep the RGB channels.

Is there any way to "force" ImageMagick to keep the RGB channels?
Thanks!
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Resizing with convert removes channels from psd

Post by snibgo »

I suppose you mean that your output file contains only gray pixels, so it has one channel but you want three.

"-type truecolor" might do it. What is your output filetype?

Also please state what version of IM you are using.
snibgo's IM pages: im.snibgo.com
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Resizing with convert removes channels from psd

Post by dlemstra »

We recently changed the behavior of the PSD coder to not automaticly change an image to grayscale. There was no way to disable this. I am not sure if that was in the latest release or in the current beta.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
ddp
Posts: 3
Joined: 2015-04-18T21:50:03-07:00
Authentication code: 6789

Re: Resizing with convert removes channels from psd

Post by ddp »

I guys,

Thanks for your replies. I'm using "6.9.1-1-Q16-x64" (which was the latest version a few days ago). My output file is also psd.

I tried adding "-type truecolor" with no luck. I used:

Code: Select all

convert 100/Checkpoint.psd -resize 25% 25/Checkpoint.psd
I also tried using "6.8.9-10-Q8-x64", no luck either.

Here's the file I'm testing this at the moment.
Here's what the photoshop channels look like:
Image

Thanks a lot for your help!
Last edited by ddp on 2015-04-19T09:01:19-07:00, edited 1 time in total.
ddp
Posts: 3
Joined: 2015-04-18T21:50:03-07:00
Authentication code: 6789

Re: Resizing with convert removes channels from psd

Post by ddp »

Just found some more info. This "Gray" channel is there because the image mode is set to Grayscale in Photoshop. If I select "Image > Mode > RGB Color" in the menu, the RGB channels appear and the Gray want goes away.

So it looks like what I'm looking for is a way to tell ImageMagick to save the psd int the RGB mode.
Post Reply