The index points out which of the images that the indicated file provides will be the default one. If a mimetype or type is supplied, the constructor will generate a print STDERRing, because Wx::Perl::Imagick lets Image::Magick figure out the type of the file, and ignores this parameter. Wx::Perl::Imagick->new(file, (mime)type, index = 0) This will create a new Wx::Perl::Imagick object from the supplied data (which can be -for example- generated from Wx::Image's GetData), using the given width and height. Wx::Perl::Imagick->new(width, height, data) This will create a new, empty Wx::Perl::Imagick object with the given width and height. Simply supply a Wx::Icon and it will create a Wx::Perl::Imagick object from it. Simply supply a Wx::Bitmap and it will create a Wx::Perl::Imagick object from it.
These are: Wx::Perl::Imagick->new(bitmap) There are several ways to construct a new Wx::Perl::Imagick object. You can find these differences in the 'Wx::Image compatible METHODS' section below. While I've tried to keep all methodcalls that Wx::Image knows the same for Wx::Perl::Imagick, there are some incompatible differences. This will greatly improve the possibilities you have with an image in wxPerl. Most of the API of Wx::Image has been copied for backwards compatibility, but you can also call any method of Image::Magick on a constructed Wx::Perl::Magick instance. This class is meant to be a replacement for Wx::Image, adding all functionality of Image::Magick. # Now it's also possible to use Image::Magick's conversions and filters
$bmp = Wx::StaticBitmap->new($panel, -1, $anotherbitmap, ) if $anotherbitmap->Ok My $anotherbitmap = $fromicon->ConvertToBitmap My $fromicon = Wx::Perl::Imagick->new($icon) My $icon = Wx::Icon->new('pvoice.ico',wxBITMAP_TYPE_ICO, 16,16 ) # And we can create an image from a Wx::Icon $bmp = Wx::StaticBitmap->new($panel, -1, $newbitmap, ) if $newbitmap->Ok My $newbitmap = $newbitmap->ConvertToBitmap My $frombmp = Wx::Perl::Imagick->new($bitmap) # Or we can create an image from a Wx::Bitmap My $bmp2 = Wx::StaticBitmap->new($panel, -1, $bitmap, ) if $bitmap->Ok My $magick = Wx::Perl::Imagick->new($img->GetWidth, $img->GetHeight, $img->GetData) My $img = Wx::Image->new('car.jpg','image/jpeg') # We can also create an image from a Wx::Image $bmp = Wx::StaticBitmap->new($panel, -1, $image->ConvertToBitmap, ) My $bmp = Wx::StaticBitmap->new($panel, -1, $image->ConvertToBitmap) My $image = Wx::Perl::Imagick->new('pvoice.ico') # Load an imagefile that contains more than one image Version 0.01 SYNOPSIS use Wx::Perl::Imagick Wx::Perl::Imagick - A drop-in replacement for Wx::Image with all functionality of Image::Magick VERSION