Page 1 of 1

converting 8 bit greyscale psd with mask and multiple layers results in cyan colored image

Posted: 2017-03-11T09:25:08-07:00
by kuschall
I have a 8 bit greyscale psd with mask and multiple layers i wish to convert to jpg or png. My best result up untill now is a cyan colored image.

Could someone guide me towards the right procedure the get the job done, please? Thank you very much!
Do I need the icc profile?

latest command:
convert test.psd -depth 8 -colorspace gray -depth 8 -colorspace gray -profile Black-White.icc -background white -layers merge test.jpg

identify image returns:

Array
(
[imageName] => test.psd
[mimetype] => image/x-psd
[format] => PSD (Adobe Photoshop bitmap)
[units] => PixelsPerInch
[type] => GrayscaleAlpha
[colorSpace] => Gray
[compression] => RLE
[fileSize] => 2.01MB
[geometry] => Array
(
[width] => 3834
[height] => 4016
)

[resolution] => Array
(
[x] => 333
[y] => 333
)
)
Array
(
[0] => 8bim
[1] => exif
[2] => icc
[3] => iptc
[4] => xmp
)
Array
(
[date:create] => 2017-03-07T10:39:15+01:00
[date:modify] => 2017-02-16T09:40:55+01:00
[dc:format] => application/vnd.adobe.photoshop
[exif:ColorSpace] => -1
[exif:NativeDigest] => 36864,40960,40961,37121,37122,40962,40963,37510,40964,36867,36868,33434,33437,34850,34852,34855,34856,37377,37378,37379,37380,37381,37382,37383,37384,37385,37386,37396,41483,41484,41486,41487,41488,41492,41493,41495,41728,41729,41730,41985,41986,41987,41988,41989,41990,41991,41992,41993,41994,41995,41996,42016,0,2,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,22,23,24,25,26,27,28,30;0162C8B34E06CAC3BECB5EE1D875CB6B
[exif:PixelXDimension] => 3834
[exif:PixelYDimension] => 4016
[icc:copyright] => Copyright 1999 Adobe Systems Incorporated
[icc:description] => Dot Gain 15%
[icc:manufacturer] => Dot Gain 15%
[icc:model] => Dot Gain 15%
[photoshop:ColorMode] => 1
[photoshop:ICCProfile] => Dot Gain 15%
[tiff:Compression] => 5
[tiff:ImageLength] => 4016
[tiff:ImageWidth] => 3834
[tiff:Make] => Microtek
[tiff:Model] => SM 9800XL 9800
[tiff:NativeDigest] => 256,257,258,259,262,274,277,284,530,531,282,283,296,301,318,319,529,532,306,270,271,272,305,315,33432;786267D39B43AEF4638255E15E3ADE13
[tiff:Orientation] => 1
[tiff:PhotometricInterpretation] => 0
[tiff:ResolutionUnit] => 2
[tiff:SamplesPerPixel] => 1
[tiff:XResolution] => 3330000/10000
[tiff:YResolution] => 3330000/10000
[xap:CreatorTool] => Adobe Photoshop CS3 Macintosh
)

Re: converting 8 bit greyscale psd with mask and multiple layers results in cyan colored image

Posted: 2017-03-11T10:06:10-07:00
by snibgo
I don't know how many images are in test.psd. Perhaps you only want the first image. If so, your input filename would be "test.psd[0]".

If you are converting with "-profile", don't use "-colorspace {anything}" first.

I don't know what your Black-White.icc profile does. I suggest you use sRGB.icc provided with ImageMagick, or some similar sRGB profile.

"-depth 8" is redundant as jpegs are always depth 8.

If your input has transparency, "-background white -layers merge" will flatten it against a white background. Using "-layers flatten" is more obvious and may be faster.

So, I suggest:

Code: Select all

convert test.psd[0] -profile sRGB.icc -background white -layers flatten test.jpg
Your input seems to be grayscale, so I expect the output would also be grayscale.

Re: converting 8 bit greyscale psd with mask and multiple layers results in cyan colored image

Posted: 2017-03-11T10:51:36-07:00
by fmw42
Please, always provide your IM version and platform when asking questions, since syntax may differ. Also provide your exact command line and if possible your images.

See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at viewtopic.php?f=1&t=9620

For novices, see

viewtopic.php?f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/