- applied T1 afm patch from Claes Jacobsson
- split IM_INCPATH and IM_LIBPATH with $Config{path_sep}, so they
work on Windows
-
+ - Added memory pools for easy cleanup of temp buffers
+ - Added read support for sgi .rgb files.
=================================================================
For latest versions check the Imager-devel pages:
$self->{ERRSTR}='format not supported'; return undef;
}
- my %iolready=(jpeg=>1, png=>1, tiff=>1, pnm=>1, raw=>1, bmp=>1, tga=>1);
+ my %iolready=(jpeg=>1, png=>1, tiff=>1, pnm=>1, raw=>1, bmp=>1, tga=>1, rgb=>1);
if ($iolready{$input{'type'}}) {
# Setup data source
$self->{IMG}=i_readtga_wiol( $IO, -1 ); # Fixme, check if that length parameter is ever needed
if ( !defined($self->{IMG}) ) {
$self->{ERRSTR}=$self->_error_as_msg();
-# $self->{ERRSTR}='unable to read tga image';
return undef;
}
$self->{DEBUG} && print "loading a tga file\n";
}
+ if ( $input{'type'} eq 'rgb' ) {
+ $self->{IMG}=i_readrgb_wiol( $IO, -1 ); # Fixme, check if that length parameter is ever needed
+ if ( !defined($self->{IMG}) ) {
+ $self->{ERRSTR}=$self->_error_as_msg();
+ return undef;
+ }
+ $self->{DEBUG} && print "loading a tga file\n";
+ }
+
+
if ( $input{'type'} eq 'raw' ) {
my %params=(datachannels=>3,storechannels=>3,interleave=>1,%input);
return 'png' if ($ext eq "png");
return 'bmp' if ($ext eq "bmp" || $ext eq "dib");
return 'tga' if ($ext eq "tga");
+ return 'rgb' if ($ext eq "rgb");
return 'gif' if ($ext eq "gif");
return ();
}
int length
+undef_int
+i_writergb_wiol(im,ig, wierdpack, compress, idstring)
+ Imager::ImgRaw im
+ Imager::IO ig
+ int wierdpack
+ int compress
+ char* idstring
+ PREINIT:
+ SV* sv1;
+ int rc;
+ int idlen;
+ CODE:
+ idlen = SvCUR(ST(4));
+ RETVAL = i_writergb_wiol(im, ig, wierdpack, compress, idstring, idlen);
+ OUTPUT:
+ RETVAL
+
+
+Imager::ImgRaw
+i_readrgb_wiol(ig, length)
+ Imager::IO ig
+ int length
+
+
+
Imager::ImgRaw
i_scaleaxis(im,Value,Axis)
Imager::ImgRaw im
filters.o dynaload.o stackmach.o datatypes.o
regmach.o trans2.o quant.o error.o convert.o
map.o tags.o palimg.o maskimg.o img16.o rotate.o
- bmp.o tga.o color.o fills.o imgdouble.o);
+ bmp.o tga.o rgb.o color.o fills.o imgdouble.o);
%opts=(
'NAME' => 'Imager',
"pnm",
"bmp",
"tga",
+ "rgb",
NULL};
i_img * i_readtga_wiol(io_glue *ig, int length);
undef_int i_writetga_wiol(i_img *img, io_glue *ig, int wierdpack, int compress, char *idstring, size_t idlen);
+i_img * i_readrgb_wiol(io_glue *ig, int length);
+undef_int i_writergb_wiol(i_img *img, io_glue *ig, int wierdpack, int compress, char *idstring, size_t idlen);
+
i_img * i_scaleaxis(i_img *im, float Value, int Axis);
i_img * i_scale_nn(i_img *im, float scx, float scy);
i_img * i_haar(i_img *im);