CMYK PSD to transparent RGB PNG - drop shadow ghosting

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?".
mik0rz
Posts: 9
Joined: 2017-03-31T07:14:36-07:00
Authentication code: 1151

Re: CMYK PSD to transparent RGB PNG - drop shadow ghosting

Post by mik0rz »

fmw42 wrote: 2017-04-03T09:36:59-07:00 Post one of those example psd image that have this issue. It might be solved by antialiasing or modifying the transparency layer

Sure ... here's one .. you'll notice a thin 1px border around the top using the last solution .. i tried playing with it, but couldn't get rid of it.

It's visible for me if i use a background color like #a3d39b (or really any light color) but not visible if i use black for the background (or other dark colors)

Here's the PSD - http://s000.tinyupload.com/index.php?fi ... 5758223869
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: CMYK PSD to transparent RGB PNG - drop shadow ghosting

Post by fmw42 »

I have processed your new example in PS (added your CMYK profile and convert with sRGB profile to RGB and saved to png). I also processed it with IM using the command from before. I do not see any issue.

Code: Select all

magick shadow_example_2.psd \
-profile /Users/fred/images/profiles/GRACoL2006_Coated1v2.icc \
-profile /Users/fred/images/profiles/sRGB.icc \
\( -clone 0 -alpha transparent \)  \
-delete 0 +insert \
-background none -layers merge \
shadow2_im.png

compare -metric rmse shadow_example_2_im.png shadow_example_2_ps.png null:
580.801 (0.00886246)

Here are the two result:

PS:
Image

IM:
Image

Do you see anything wrong that I have missed?
mik0rz
Posts: 9
Joined: 2017-03-31T07:14:36-07:00
Authentication code: 1151

Re: CMYK PSD to transparent RGB PNG - drop shadow ghosting

Post by mik0rz »

Hmmm .. yours looks good ... i don't know why mine has the little white-ish keyline .. i used your code exactly
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: CMYK PSD to transparent RGB PNG - drop shadow ghosting

Post by fmw42 »

What is your version of libpng? I am using

Code: Select all

convert -list format
PNG* PNG rw- Portable Network Graphics (libpng 1.6.28)
mik0rz
Posts: 9
Joined: 2017-03-31T07:14:36-07:00
Authentication code: 1151

Re: CMYK PSD to transparent RGB PNG - drop shadow ghosting

Post by mik0rz »

i have 1.6.26, but i cant figure out for the life of me how to upgrade it
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: CMYK PSD to transparent RGB PNG - drop shadow ghosting

Post by fmw42 »

Seems like it would be adequate. Not sure what is happening? What is you platform and how did you install IM?
mik0rz
Posts: 9
Joined: 2017-03-31T07:14:36-07:00
Authentication code: 1151

Re: CMYK PSD to transparent RGB PNG - drop shadow ghosting

Post by mik0rz »

Windows Server 2008 R2.. installed the 32-bit binary for Windows -- ImageMagick Version 7.0.5-0 Q8 (32-bit)

I also installed the very latest version of IM and tried it with no success.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: CMYK PSD to transparent RGB PNG - drop shadow ghosting

Post by fmw42 »

Windows and Unix syntax are different. For Windows you could try:

Code: Select all

magick shadow_example_2.psd ^
-profile /Users/fred/images/profiles/GRACoL2006_Coated1v2.icc ^
-profile /Users/fred/images/profiles/sRGB.icc ^
( -clone 0 -alpha transparent )  ^
-delete 0 +insert ^
-background none -layers merge ^
shadow2_im.png
Do you have the required profiles on your system and did you change the path to that on your system with \ rather than the unix /

Perhaps upgrade to the current IM 7.0.5.4, which is what i used.
Post Reply