Color Shifting with ImageMagick

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?".
pssvarma8881
Posts: 45
Joined: 2016-09-18T15:42:46-07:00
Authentication code: 1151

Color Shifting with ImageMagick

Post by pssvarma8881 »

Hello All,

We are facing multiple issues with ImageMagick .

Version Information :
Version: ImageMagick 6.9.0-0 Q16 x64 2014-11-14 http://www.imagemagick.org



PSD to PSD -CMYK
- color Shifting
- Loosing Alpha Channels
- Background Changing from Transparent to white

Command Used :
convert -verbose -transparent white -flatten +matte -units PixelsPerInch +profile 8bim %1[0] -colorspace CMYK -profile "D:\Droplets\SWOP2006_Coated3v2.icc" "M:%MYPARAM4%%~n1.PSD"




PSD to PSD - Changing dpi to 100 DPI
- color Shifting
- Loosing Alpha Channels
- Background Changing from Transparent to white

Command Used

convert -verbose -transparent white -flatten +matte -units PixelsPerInch +profile 8bim -density 100 %1[0] "M:%MYPARAM4%%~n1.PSD"



PSD to PSD - JPEG
- color shifting
- Command

CONVERT verbose -transparent white -flatten +matte -units PixelsPerInch +profile 8bim -density 72 -resize 2000 %1[0] -profile "D:\Droplets\sRGB Profile.icc" "M:%MYPARAM4%%~n1.jpg"


PSD to PNG - PNG

- color shifting
- Command

convert -verbose -transparent white -flatten +matte -units PixelsPerInch +profile 8bim -density 72 -resize 500 %1[0] -profile "D:\Droplets\sRGB Profile.icc" "M:%MYPARAM4%%~n1.png"


Let me know how to resolve these issues.

Thanks in advance .
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Color Shifting with ImageMagick

Post by snibgo »

"-flatten" removes transparency, so that's one problem solved. If you don't want to lose transparency, don't "-flatten".

"+matte" is deprecated. Don't use it. What do you want that to do?

If you are working with profiles, you almost certainly should not also use "-colorspace CMYK". Doing so will cause "colour shifting".

Any other problems?
snibgo's IM pages: im.snibgo.com
pssvarma8881
Posts: 45
Joined: 2016-09-18T15:42:46-07:00
Authentication code: 1151

Re: Color Shifting with ImageMagick

Post by pssvarma8881 »

you can download the source files from below link

https://1drv.ms/f/s!AuiGMeVn7efEd0NadxGpbItZCxI
pssvarma8881
Posts: 45
Joined: 2016-09-18T15:42:46-07:00
Authentication code: 1151

Re: Color Shifting with ImageMagick

Post by pssvarma8881 »

2 Other Problems

1 . Colour shifting with RGB Conversion
2 . Loosing Alpha Channels
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Color Shifting with ImageMagick

Post by snibgo »

pssvarma8881 wrote:1 . Colour shifting with RGB Conversion
With v6.9.5-3, I can't see a colour problem with, for example:

Code: Select all

convert W_MYAG_CDH52_14143_001_ORIG.psd[1] -profile sRGB.icc x.tiff
That image is opaque (according to IM's "identify"). But it does have a clip path, if you want to use that. See http://www.imagemagick.org/script/comma ... s.php#clip
pssvarma8881 wrote:2 . Loosing Alpha Channels
All of your commands use "-flatten". This removes all transparency. With no transparency, there is no need for an alpha channel.
snibgo's IM pages: im.snibgo.com
pssvarma8881
Posts: 45
Joined: 2016-09-18T15:42:46-07:00
Authentication code: 1151

Re: Color Shifting with ImageMagick

Post by pssvarma8881 »

When we are converting original PSD to PSD with 100 dpi we are losing alpha Channels . We need these alpha channels after the transformation as these will be used by our consumers.

For Color shifting please download the document which i uploaded to that .That document explains the differences between Source file and converted file.
pssvarma8881
Posts: 45
Joined: 2016-09-18T15:42:46-07:00
Authentication code: 1151

Re: Color Shifting with ImageMagick

Post by pssvarma8881 »

Thanks for your quick response ;-)



For Alpha Channels :

I am i tried without -flatten command which solved my transparency problem .But i am still loosing the alpha channels.

Command i used :

convert -verbose -units PixelsPerInch +profile 8bim -density 100 %1[0] "M:%MYPARAM4%%~n1.PSD"
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Color Shifting with ImageMagick

Post by fmw42 »

I do not know if this will help, but proper IM 6 and 7 syntax would read the input PSD image first before applying any settings or operators.

Your image has a group layer and adjustment layers. IM cannot deal with group or adjustment layer fully.

Also when I do

identify -verbose W_MYAG_CDH52_14143_001_ORIG.psd
Abort trap

But I will let one of the IM developers look at your file and explain further.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Color Shifting with ImageMagick

Post by fmw42 »

I also get on IM 6.9.5.10 Q16 Mac OSX

Code: Select all

convert W_MYAG_CDH52_14143_001_ORIG.psd -define psd:additional-info=all tmp.psd
Abort trap


Code: Select all

convert -define psd:alpha-unblend=off W_MYAG_CDH52_14143_001_ORIG.psd[0] tmp.psd
convert: memory allocation failed `tmp.psd' @ error/psd.c/WritePSDImage/3131.
pssvarma8881
Posts: 45
Joined: 2016-09-18T15:42:46-07:00
Authentication code: 1151

Re: Color Shifting with ImageMagick

Post by pssvarma8881 »

thanks for your help .

Let me know the developer so that I can contact him.

Regards,
P.S.S.Varma
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Color Shifting with ImageMagick

Post by fmw42 »

He should contact you by tomorrow. I sent him a note to look at this topic.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Color Shifting with ImageMagick

Post by dlemstra »

You did not leave me a note but I got your e-mail. I will take a look at this topic later this week/weekend.

p.s. I really don't understand why IM fails with an 'Abort trap' on your system Fred. Can you give it a try with an earlier version?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Color Shifting with ImageMagick

Post by fmw42 »

dlemstra:

Not sure why you did not get my PM. But you got my email. The following current and older versions still abort trap on me.


IM 6.9.5.10
identify -verbose W_MYAG_CDH52_14143_001_ORIG.psd
Abort trap

im6959 identify -verbose W_MYAG_CDH52_14143_001_ORIG.psd
Abort trap

im6958 identify -verbose W_MYAG_CDH52_14143_001_ORIG.psd
Abort trap

IM 7.0.3.1
im7 magick identify -verbose W_MYAG_CDH52_14143_001_ORIG.psd
Abort trap
pssvarma8881
Posts: 45
Joined: 2016-09-18T15:42:46-07:00
Authentication code: 1151

Re: Color Shifting with ImageMagick

Post by pssvarma8881 »

Hi ,

Please let us know if you found anything .
pssvarma8881
Posts: 45
Joined: 2016-09-18T15:42:46-07:00
Authentication code: 1151

Re: Color Shifting with ImageMagick

Post by pssvarma8881 »

@dlemstra Kindly let me know if you found anything on this
Post Reply