Embedded pattern images
Bob Friesenhahn <[email protected]>
| Newsgroups | gmane.comp.video.graphicsmagick.core |
|---|---|
| Message-ID | <[email protected]> |
Historically, ImageMagick has provided several "embedded" images,
accessed via individual coders. For example "LOGO:" has returned the
ImageMagick logo image. There is also "GRANITE:" and "ROSE:". This
means of accessing embedded images is structurally very innefficient
since it results in a coder registration for each image. Yesterday I
added an "IMAGE:" specifier which may be used to retrieve these
"legacy" images similar to a filename (e.g. "image:name"). As of a
few minutes ago (in GraphicsMagick CVS), it may be used to retrieve a
number of tiny bilevel pattern images which are useful for filling
objects.
Here is part of the ChangeLog entry:
* coders/logo.c: Renamed "transparent" image to "checkerboard"
since it is a better description. Added a set of tiny bilevel
images (accessed via IMAGE:) for use when tiling, filling, or for
use as a texture image. The complete set of image names available
via the IMAGE: coder are now BRICKS, CIRCLES, CROSSHATCH,
CROSSHATCH30, CROSSHATCH45, FISHSCALES, GRANITE, HEXAGONS,
HORIZONTAL, HORIZONTALSAW, HS_BDIAGONAL, HS_CROSS, HS_DIAGCROSS,
HS_FDIAGONAL, HS_HORIZONTAL, HS_VERTICAL, LEFT30, LEFT45,
LEFTSHINGLE, LOGO, NETSCAPE, OCTAGONS, RIGHT30, RIGHT45,
RIGHTSHINGLE, ROSE, SMALLFISHSCALES, CHECKERBOARD, VERTICAL,
VERTICALBRICKS, VERTICALLEFTSHINGLE, VERTICALRIGHTSHINGLE, &
VERTICALSAW. The HS_* variants are similar to the standard
pattern images provided with the Windows GDI.
A simple example of using these pattern images is the following:
gm convert -size 320x200 tile:image:HORIZONTALSAW saw.png
The resulting saw.png contains the pattern replicated over a 320x200
area.
These patterns were added because they require very little space while
providing access to a common set of "standard" patterns which will be
available to GraphicsMagick users starting in the next release.
Bob
======================================
Bob Friesenhahn
[email protected]
http://www.simplesystems.org/users/bfriesen
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com