Imager::ImageTypes

Imager::ImageTypes is a Perl module that contains image models for Imager.
Download

Imager::ImageTypes Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Tony Cook, Arnar M. Hrafnkelsson
  • Publisher web site:
  • http://search.cpan.org/~tonyc/Imager-0.61/lib/Imager/ImageTypes.pod

Imager::ImageTypes Tags


Imager::ImageTypes Description

Imager::ImageTypes is a Perl module that contains image models for Imager. Imager::ImageTypes is a Perl module that contains image models for Imager.SYNOPSIS use Imager; $img = Imager->new(); # Empty image (size is 0 by 0) $img->open(file=>'lena.png',type=>'png'); # Read image from file $img = Imager->new(xsize=>400, ysize=>300); # RGB data $img = Imager->new(xsize=>400, ysize=>300, # Grayscale channels=>1); # $img = Imager->new(xsize=>400, ysize=>300, # RGB with alpha channels=>4); # $img = Imager->new(xsize=>200, ysize=>200, type=>'paletted'); # paletted image $img = Imager->new(xsize=>200, ysize=>200, bits=>16); # 16 bits/channel rgb $img = Imager->new(xsize=>200, ysize=>200, bits=>'double'); # 'double' floating point # per channel $img->img_set(xsize=>500, ysize=>500, # reset the image object channels=>4); # Example getting information about an Imager object print "Image information:n"; print "Width: ", $img->getwidth(), "n"; print "Height: ", $img->getheight(), "n"; print "Channels: ", $img->getchannels(), "n"; print "Bits/Channel: ", $img->bits(), "n"; print "Virtual: ", $img->virtual() ? "Yes" : "No", "n"; my $colorcount = $img->getcolorcount(maxcolors=>512); print "Actual number of colors in image: "; print defined($colorcount) ? $colorcount : ">512", "n"; print "Type: ", $img->type(), "n"; if ($img->type() eq 'direct') { print "Modifiable Channels: "; print join " ", map { ($img->getmask() & 1colorcount; @colors = $img->getcolors(); print "Palette size: $countn"; my $mx = @colors > 4 ? 4 : 0+@colors; print "First $mx entries:n"; for (@colors) { my @res = $_->rgba(); print "(", join(", ", @res), ")n"; } } my @tags = $img->tags(); if (@tags) { print "Tags:n"; for(@tags) { print shift @$_, ": ", join " ", @$_, "n"; } } else { print "No tags in imagen"; }Requirements:· Perl Requirements: · Perl


Imager::ImageTypes Related Software