require Exporter;
require DynaLoader;
- $VERSION = '0.39';
+ $VERSION = '0.40pre1';
@ISA = qw(Exporter DynaLoader);
bootstrap Imager $VERSION;
}
# i_init_fonts();
# $fontstate='ok';
# }
+ if (exists $parms{'t1log'}) {
+ i_init_fonts($parms{'t1log'});
+ }
}
END {
$self->_set_error("Handle in fh option not opened");
return;
}
+ # flush it
+ my $oldfh = select($input->{fh});
+ # flush anything that's buffered, and make sure anything else is flushed
+ $| = 1;
+ select($oldfh);
return io_new_fd($fd);
}
elsif ($input->{file}) {
for my $pos (@$positions) {
my ($x, $y) = @$pos;
my $img = $imgs[$index++];
- $img->settag(gif_left=>$x);
- $img->settag(gif_top=>$y) if defined $y;
+ $img->settag(name=>'gif_left', value=>$x);
+ $img->settag(name=>'gif_top', value=>$y) if defined $y;
}
$$msg .= "replaced with the gif_left and gif_top tags";
}
or return undef;
if (ref $x && ref $y) {
unless (@$x == @$y) {
- $self->{ERRSTR} = 'length of x and y mistmatch';
+ $self->{ERRSTR} = 'length of x and y mismatch';
return undef;
}
if ($color->isa('Imager::Color')) {
sub getpixel {
my $self = shift;
- my %opts = ( type=>'8bit', @_);
+ my %opts = ( "type"=>'8bit', @_);
unless (exists $opts{'x'} && exists $opts{'y'}) {
$self->{ERRSTR} = 'missing x and y parameters';
return undef;
}
my @result;
- if ($opts{type} eq '8bit') {
+ if ($opts{"type"} eq '8bit') {
for my $i (0..$#{$opts{'x'}}) {
push(@result, i_get_pixel($self->{IMG}, $x->[$i], $y->[$i]));
}
return wantarray ? @result : \@result;
}
else {
- if ($opts{type} eq '8bit') {
+ if ($opts{"type"} eq '8bit') {
return i_get_pixel($self->{IMG}, $x, $y);
}
else {
=head2 Basic Overview
-An Image object is created with C<$img = Imager-E<gt>new()> Should
-this fail for some reason an explanation can be found in
-C<$Imager::ERRSTR> usually error messages are stored in
-C<$img-E<gt>{ERRSTR}>, but since no object is created this is the only
-way to give back errors. C<$Imager::ERRSTR> is also used to report
-all errors not directly associated with an image object. Examples:
+An Image object is created with C<$img = Imager-E<gt>new()>.
+Examples:
- $img=Imager->new(); # This is an empty image (size is 0 by 0)
- $img->open(file=>'lena.png',type=>'png'); # initializes from file
+ $img=Imager->new(); # create empty image
+ $img->open(file=>'lena.png',type=>'png') or # read image from file
+ die $img->errstr(); # give an explanation
+ # if something failed
or if you want to create an empty image:
This example creates a completely black image of width 400 and height
300 and 4 channels.
+When an operation fails which can be directly associated with an image
+the error message is stored can be retrieved with
+C<$img-E<gt>errstr()>.
+
+In cases where no image object is associated with an operation
+C<$Imager::ERRSTR> is used to report errors not directly associated
+with an image object.
+
=head1 SUPPORT
You can ask for help, report bugs or express your undying love for
or use the form at:
http://www.molar.is/en/lists/imager-devel/
+ (annonymous is temporarily off due to spam)
where you can also find the mailing list archive.
=head1 AUTHOR
-Arnar M. Hrafnkelsson (addi@umich.edu) and Tony Cook
+Arnar M. Hrafnkelsson (addi@imager.perl.org) and Tony Cook
(tony@imager.perl.org) See the README for a complete list.
=head1 SEE ALSO
-perl(1), Imager::Color(3), Imager::Font(3), Imager::Matrix2d(3),
+perl(1), Imager::ImageTypes(3), Imager::Files(3), Imager::Draw(3),
+Imager::Color(3), Imager::Fill(3), Imager::Font(3),
+Imager::Transformations(3), Imager::Engines(3), Imager::Filters(3),
+Imager::Expr(3), Imager::Matrix2d(3), Imager::Fountain(3)
Affix::Infix2Postfix(3), Parse::RecDescent(3)
http://www.eecs.umich.edu/~addi/perl/Imager/
=cut
+
+
+
+