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.
Adding Checkerboard pattern to transparency
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Adding Checkerboard pattern to transparency
try this using the IM internal logo: image. Adjust the brightness-contrast as desired. Then insert your own image.
# create transparent image
# process
On windows use (....) rather than \(....\)
# create transparent image
Code: Select all
convert logo: -transparent white logot.png
Code: Select all
convert logot.png \( -size 640x480 tile:pattern:checkerboard -brightness-contrast 20,10 \) +swap -compose over -composite show: