BEGIN {
require Exporter;
@ISA = qw(Exporter);
- $VERSION = '0.57_01';
+ $VERSION = '0.59';
eval {
require XSLoader;
XSLoader::load(Imager => $VERSION);
$self->_set_error("resulting image would have no content");
return;
}
-
+ if( $r < $l or $b < $t ) {
+ $self->_set_error("attempting to crop outside of the image");
+ return;
+ }
my $dst = $self->_sametype(xsize=>$r-$l, ysize=>$b-$t);
i_copyto($dst->{IMG},$self->{IMG},$l,$t,$r,$b,0,0);
my $page = $input{'page'};
defined $page or $page = 0;
$self->{IMG} = i_readgif_single_wiol( $IO, $page );
- if ($input{colors}) {
+ if ($self->{IMG} && $input{colors}) {
${ $input{colors} } =
[ i_getcolors($self->{IMG}, 0, i_colorcount($self->{IMG})) ];
}
libraries, and any relevant code. If you have specific images that
cause the problems, please include those too.
-=head1 BUGS
+If you don't want to publish your email address on a mailing list you
+can use CPAN::Forum:
+
+ http://www.cpanforum.com/dist/Imager
+
+You will need to register to post.
+
+=head1 CONTRIBUTING TO IMAGER
+
+=head2 Feedback
+
+I like feedback.
-Bugs are listed individually for relevant pod pages.
+If you like or dislike Imager, you can add a public review of Imager
+at CPAN Ratings:
+
+ http://cpanratings.perl.org/dist/Imager
+
+This requires a Bitcard Account (http://www.bitcard.org).
+
+You can also send email to the maintainer below.
+
+If you send me a bug report via email, it will be copied to RT.
+
+=head2 Patches
+
+I accept patches, preferably against the main branch in subversion.
+You should include an explanation of the reason for why the patch is
+needed or useful.
+
+Your patch should include regression tests where possible, otherwise
+it will be delayed until I get a chance to write them.
=head1 AUTHOR
-Arnar M. Hrafnkelsson and Tony Cook (tony@imager.perl.org) among
-others. See the README for a complete list.
+Tony Cook <tony@imager.perl.org> is the current maintainer for Imager.
+
+Arnar M. Hrafnkelsson is the original author of Imager.
+
+Many others have contributed to Imager, please see the README for a
+complete list.
=head1 SEE ALSO