if ($ex_version < 5.57) {
@ISA = qw(Exporter);
}
- $VERSION = '1.006';
+ $VERSION = '1.009';
require XSLoader;
XSLoader::load(Imager => $VERSION);
}
++$index;
}
- return i_img_make_palette($quant, map $_->{IMG}, @images);
+ my @cols = i_img_make_palette($quant, map $_->{IMG}, @images);
+ unless (@cols) {
+ Imager->_set_error(Imager->_error_as_msg);
+ return;
+ }
+ return @cols;
}
# convert a paletted (or any image) to an 8-bit/channel RGB image
# Default guess for the type of an image from extension
-my @simple_types = qw(png tga gif raw ico cur xpm mng jng ilbm pcx psd eps);
+my @simple_types = qw(png tga gif raw ico cur xpm mng jng ilbm pcx psd eps webp xwd xpm dng ras);
my %ext_types =
(
return $type;
}
+sub add_type_extensions {
+ my ($class, $type, @exts) = @_;
+
+ for my $ext (@exts) {
+ exists $ext_types{lc $ext} or $ext_types{lc $ext} = lc $type;
+ }
+ 1;
+}
+
sub combines {
return @combine_types;
}
addtag() - L<Imager::ImageTypes/addtag()> - add image tags
+add_type_extensions() -
+L<Imager::Files/add_type_extensions($type, $ext, ...)> - add extensions for
+new image file types.
+
align_string() - L<Imager::Draw/align_string()> - draw text aligned on a
point