'non-file image types in GraphicsMagick
I recently discovered the existence in GraphicksMagick
of image types that are not actual image files. For instance, here is an excerpt of a gm batch
script I am using to time-stamp and mask a series of images for a video:
convert -font helvetica -fill black -pointsize 48 label:"2 days, 7:31:42" mpr:label
convert -crop 1616x1769+0+0 movies/worm7/sim7aseed123456/plot-1_199902.png mpr:cropped
composite movies/worm7/maskmatte.png mpr:cropped mpr:masked
composite -gravity North mpr:label mpr:masked movies/worm7/scratch/plot-1_199902.png
convert -font helvetica -fill black -pointsize 48 label:"2 days, 7:33:22" mpr:label
convert -crop 1616x1769+0+0 movies/worm7/sim7aseed123456/plot-1_200002.png mpr:cropped
composite movies/worm7/maskmatte.png mpr:cropped mpr:masked
composite -gravity North mpr:label mpr:masked movies/worm7/scratch/plot-1_200002.png
That's eight lines from an 8000 line script that processes 2000 input images. The images whose names end in .png
are of course real image files. However, in this script I also use two types of images that don't correspond to any file. label:"2 days, 7:33:22"
refers to an image created by rendering that text in the font specified by options. mpr:label
, mpr:cropped
, and mpr:masked
are intermediate results that are held in working memory during execution of the script, avoiding the need to create temporary files.
My questions are two: First, are there any other such non-file image types that GraphicsMagick
recognizes? Second, are these documented anywhere?
I found label:
and mpr:
mentioned in some gm
examples that I googled up pretty much at random. They are super-useful, so I'd like to know what else I'm missing.
To forestall a particular type of answer I don't need: Yes, I am aware of the list of image formats in the gm man page, and of this text:
To read the "built-in" formats (GRANITE, H, LOGO, NETSCAPE, PLASMA, and
ROSE) use a prefix (including the colon) without a filename or suffix.
To read the XC format, follow the colon with a color specification. To
read the CAPTION format, follow the colon with a text string or with a
filename prefixed with the at symbol (@).
But I have not found anywhere in the man pages an answer to my questions.
Many thanks.
Solution 1:[1]
I don't know how many are supported by GraphicsMagick, but there are lists of ImageMagick pseudo-image formats here
You may want to read here too.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Mark Setchell |