PSD slides to left when converting to PDF with cmyk

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
neerajverma14
Posts: 1
Joined: 2016-01-08T07:09:52-07:00
Authentication code: 1151

PSD slides to left when converting to PDF with cmyk

Post by neerajverma14 »

ImageMagick Version: 6.9.1-2 Q16 x64 2015-04-14
OS: Windows 7 64 bit

Hi all,
This is my first post so please ignore my mistakes.

I need to convert a PSD file to PDF, the PSD is having colorspace cmyk and target pdf should be same. I also need to apply watermark to converted pdf. the code I am using

Code: Select all

"d:\Temp\src\test.psd[0]" -density 300 -profile "C:\ImageMagick\sRGB.icc" -thumbnail 800X800> -gravity Center "d:\Temp\targetWatermarkFile.png" -composite -profile "C:\icc-profiles\adobe\cmyk\USWebCoatedSWOP.icc" -depth 8 "d:\Temp\tgt\test.Pdf"
Size of the PSD is 3000X3000. Size of watermark, which is a png is 600X399.

The problem is that PDF is created but the image slides to Left.
Note:
1. If I do not use watermark then it works properly
2. If I convert it to sRGB Profile, It works Properly.
3. If I use resize instead of thumbnail, It works,

I cannot use resize for some reasons. Can anyone help me figuring out "If it works with resize why its not working with thumbnail".
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: PSD slides to left when converting to PDF with cmyk

Post by fmw42 »

Your image(s) may have built in virtual canvas offsets. Try putting +repage after reading each input. Otherwise, post your images to some place such as dropbox.com and put the URLs here so we can test them.

Also -thumbnail has a built-in -strip and that may be your issue. Some meta data in the PSD file is being removed. -thumbnail is similar to -strip -resize. So perhaps use -resize and then -strip before the output. With your -thumbnail, you are stripping any profiles other than color. That means some of the PSD profiles are being removed, which probably contain the meta data that you need.

see http://www.imagemagick.org/script/comma ... .php#strip and http://www.imagemagick.org/script/comma ... #thumbnail
Post Reply