Upgrade montage caused change in PDF alpha channels

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
Posts: 1
Joined: 2016-03-26T11:19:12-07:00
Authentication code: 1151

Upgrade montage caused change in PDF alpha channels

Post by image_fixer » 2016-03-26T12:20:20-07:00

I've been using montage to create contact sheets out of a variety of image formats including pdfs.
I've a script that calls imagemagick and It has been working well on both Mac a PC.

I have been using a mac build from the catcus labs site:
ImageMagick 6.9.1-0 on the mac and ImageMagick 6.9.1-1 on the PC
Ghostscript 9.07 on the mac and Ghostscript 9.16 on the PC

Recently I upgraded to ImageMagick 6.9.3-0 and Ghostscript 9.18 on the mac
I've noticed a much fast processing time and an occasional tendency to hang is gone, but unfortunately there is a new problem in how pdf alpha channels are handled by the montage command.

I'm using the following parameters:
-label %f
-pointsize 12
-fill "#FFFFFF"
-border 1
-bordercolor "#F7F7F7"
-frame 1
-mattecolor white
-background "#7F7F7F"

With the older version I get the alpha channel of the PDF filled with a white color, but with the newer version, the alpha channel remains and is comped against the sheet's background color. Ideally, I would like alpha to be filled with an off white "F7F7F7" which would distinguish it from both the very common white document and the dark grey background but having the alpha channel essentially be replaced with the background color of the sheet doesn't work for the needs of the contact sheet

I've tried various changes to the parameters but I can find anything that works. Note: flatten will not work work because we are talking about multiple images and often multiple pages in the PDF. I would also prefer not to use a pre Convert or ghostscript command if possible. For example, I was able to to take resulting images from a separate GS command, then flatten them, then montage them , but that is quite slow and I'm better off with the old version.

Is there a solution? I've seen similar posts usually regarding the use of GS pngalpha device and how that has affected trasnparency, but I haven't a definitive answer that will help. Can you improve my Parameters to get a dark background color, an off white tile fill color and transparency color and a white text color?

I can send attachments of a test PDF and snapshots with the results of before and after the upgrade

Post Reply