Annotation and Drawing
Image::Magick still sports some powerful drawing features that you may choose to use over GD’s simple drawing API (see Chapter 2). In particular, Image::Magick has better text annotation capabilities, allowing you to use TrueType, PostScript, and X11 fonts. Additionally, you can query the metrics of those fonts for information that is necessary for more complicated text layouts. Table 3-6 lists the attributes associated with drawing and annotation.
Attribute | Read | Write | Description |
| Yes | Yes | If a true value, use antialiasing when drawing or annotating an image. |
| Yes | Yes | The text annotation
methods |
| Yes | No | Methods |
| Yes | Yes | The @pixel = split /,/,
$image->Get('pixel[20,50]');
print "Red: $pixel[0]\nGreen: $pixel[1]\nBlue: $pixel[2]\nOpacity: $pixel[3]\n";
will print the ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access