Page 1 of 1

Converting transparent PDF files with Imagick

Posted: 2012-10-04T02:24:49-07:00
by friend
I have a problem creating thumbnails with PHP and imagick. The code is working ok and the thumbnail is generated in the correct size etc but when I try to place a PDF logo on the thumbnail it turns half transparent. I guess it has something to do with the PDF file being generated in InDesign and it probably doesn't have any background defined. Has anyone come across this problem or has an idea what to do about it? I tried to put a white canvas in the background but that didn't help. I also tried various channel settings for the compositeImage function but that didn't help either.

This is the PDF file I'm having issues with: https://dl.dropbox.com/u/13712643/Case_Study.pdf The generated Thumbnail looks like this: https://dl.dropbox.com/u/13712643/Case_Study1.jpg

The code I have produced so far: http://pastebin.com/74CYC972

Any ideas? Thank you for your help.

Re: Converting transparent PDF files with Imagick

Posted: 2012-10-17T21:40:15-07:00
by fmw42
Your PDF file is in CMYK colorspace and -composite, I believe needs to work in RGB. So do -colorspace sRGB before you read in your PDF, if your IM version is 6.7.6.7 or higher. If not, then use -colorspace RGB.

You don't show the image that you want to overlay. So that may help, if the above does not work.