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 ... |
Get Perl Graphics Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.