Page 1 of 1
Built In Checkerboard WHITE/Gray instead of Gray/Darker Gray
Posted: 2011-03-21T09:37:50-07:00
by dfelder
The built in checkerboard feature is great; however, the two colors are Gray and Darker Gray. For the highest contrast, Gray/White (or Black/White) would be preferred (like PhotoShop).
Is there a way to change this built-in pattern? I changed the checkerboard.png file in the Patterns folder, but that didn't do the trick.
Thanks.
Re: Built In Checkerboard WHITE/Gray instead of Gray/Darker
Posted: 2011-03-21T10:35:08-07:00
by fmw42
why not use the checkerboard as is and stretch the contrast using -level or -auto-level
convert -size 100x100 pattern:checkerboard -auto-level checker_black_white.gif
or
convert -size 100x100 pattern:checkerboard -level 25,75% checker_level25x75.gif
Re: Built In Checkerboard WHITE/Gray instead of Gray/Darker
Posted: 2011-03-21T12:00:54-07:00
by dfelder
The problem is that I'm layering it below a PNG image with transparencies, so i'm using the built in to facilitate the layering.
objMi.Composite "-compose", "Dst_Over", "-tile", "pattern:checkerboard", myimagename, myimagename
That's why I wanted to use a slightly different checkerboard to show the highest possible contrast when I thumbnail it.
Re: Built In Checkerboard WHITE/Gray instead of Gray/Darker
Posted: 2011-03-21T12:14:01-07:00
by fmw42
just create the checkerboard with contrast and save it as a temporary image, then use it in your composite. you can tile with any image.
Re: Built In Checkerboard WHITE/Gray instead of Gray/Darker
Posted: 2011-03-21T13:30:32-07:00
by dfelder
For a guy like me, it's easier said than done. LOL.
It took me a really long time to figure out how to add a stroke to an image, but I just got it all together. My solution is posted here:
viewtopic.php?f=1&t=18307&p=70413#p70413
Final Solution:
Code: Select all
objMi.Convert -size 100x100 pattern:checkerboard -auto-level checker_black_white.gif
objMi.Composite "-compose", "Dst_Over", "-tile", "checker_black_white.gif", myimagename, myimagename
THANKS!!!
Re: Built In Checkerboard WHITE/Gray instead of Gray/Darker
Posted: 2011-03-21T20:00:58-07:00
by anthony
First checkerboard re-coloring. is as fred describes. normalize (auto-level) it first the use +level or +level-colors to re-color it as you like...
Code: Select all
convert -size 60x60 pattern:checkerboard -auto-level \
+level-colors red,blue pattern_color_checks.gif
this is from Tiling, Modifying Built-in IM Patterns/Tiles
http://www.imagemagick.org/Usage/canvas/#pattern
The other problem is if you don;t want to read the tile from a disk file.
There are three solutions. MPR, clone-append, and distort
See Tiling with an Image already In Memory
http://www.imagemagick.org/Usage/canvas/#tile_memory
The first fits with using -tile the last generates canvases using tile (or distorted tiles)
Re: Built In Checkerboard WHITE/Gray instead of Gray/Darker
Posted: 2011-03-21T20:08:32-07:00
by fmw42
With Anthony's technique you can set the graylevels to anything you want (100 % white and 75% black, ie 25% white)
convert -size 60x60 pattern:checkerboard -auto-level \
+level 25,100% pattern_white_gray_checks.gif