NAME
App::MathImage::Image::Base::Magick -- draw images using Image Magick
SYNOPSIS
use App::MathImage::Image::Base::Magick;
my $image = App::MathImage::Image::Base::Magick->new (-width => 100,
-height => 100);
$image->rectangle (0,0, 99,99, 'white');
$image->xy (20,20, 'black');
$image->line (50,50, 70,70, '#FF00FF');
$image->line (50,50, 70,70, '#0000AAAA9999');
$image->save ('/some/filename.png');
CLASS HIERARCHY
App::MathImage::Image::Base::Magick is a subclass of Image::Base,
Image::Base
App::MathImage::Image::Base::Magick
DESCRIPTION
App::MathImage::Image::Base::Magick extends Image::Base to create or update image files using Image::Magick.
Colour names are anything recognised by ImageMagick,
file:///usr/share/doc/imagemagick/www/color.html
It includes 1, 2 and 4-digit hex "#RGB", "#RRGGBB", "#RRRRGGGGBBBB", and other colour model forms, and a table of names roughly per X11 plus a config/colors.xml for extras.
By default ImageMagick uses "anti-aliasing" to blur the edges of lines etc drawn. This is unlike the other Image::Base modules but currently it's not changed or overridden in the methods here. Perhaps that will change.
FUNCTIONS
$image = App::MathImage::Image::Base::Magick->new (key=>value,...)-
Create and return a new image object. A new image can be started with
-widthand-height,$image = App::MathImage::Image::Base::Magick->new (-width => 200, -height => 100);Or an existing file can be read,
$image = App::MathImage::Image::Base::Magick->new (-file => '/some/filename.png');Or an
Image::Magickobject can be given,$image = App::MathImage::Image::Base::Magick->new (-imagemagick => $mobj);
ATTRIBUTES
-width(integer)-height(integer)-
Setting these changes the size of the image.
-imagemagick-
The underlying
Image::Magickobject. -file-
The filename for
loadorsave, or tonewto create and load. (This is the "filename" attribute of the imagemagick.)The current code uses ImageMagick
Write, which means a "%d" or "%03d" etc in the filename expands to a sequential number. The intention in the future is to ensure-fileis treated literally, without such expansion, if at all possible, since that's how otherImage::Baseclasses behave. -zlib_compression(integer 0-9 or -1)-
The amount of data compression to apply when saving. The value is Zlib style 0 for no compression up to 9 for maximum effort. -1 means Zlib's default, usually 6.
undefmeans ImageMagick's default, which is 7. (This attribute becomes the ImageMagick "quality" parameter.)
SEE ALSO
Image::Base, Image::Base::GD, Image::Base::PNGwriter, Image::Magick, Image::Xbm, Image::Xpm, Image::Pbm