Page 1 of 1

Adding Checkerboard pattern to transparency

Posted: 2014-01-30T17:16:23-07:00
by RedFlyer
So I'm working on making IM convert pngs and gifs with transparency to jpgs and use a checkerboard pattern to represent the transparency. Coming from photoshop the built in checkerboard pattern in IM is really dark and doesn't really read right. I've worked out one solution of bringing in a captured checker pattern from PS and tiling it as a background.

composite -compose Dst_Over -tile checkerBG.gif alphapng.png output.jpg

Just wondering if there is a way to edit the builtin checkerboard pattern at all(possibly to lighten) or if there are any thoughts on the command I've got so far.

It seems to work with tiffs and some PSDs; only works with 8bit grayscale, RGB, and LAB.

Any critiques are welcome!
thanks.

Re: Adding Checkerboard pattern to transparency

Posted: 2014-01-30T19:57:51-07:00
by fmw42
try this using the IM internal logo: image. Adjust the brightness-contrast as desired. Then insert your own image.

# create transparent image

Code: Select all

convert logo: -transparent white logot.png
# process

Code: Select all

convert logot.png \( -size 640x480 tile:pattern:checkerboard -brightness-contrast 20,10 \) +swap -compose over -composite show:
On windows use (....) rather than \(....\)