arial.ttf at 14pixels)
- Added tga.c to read targa images
- Added i_bumpmap_complex to do more accurate bumpmapping
+ - added an image type with doubles as samples
=================================================================
$self->{IMG} = i_img_pal_new($hsh{xsize}, $hsh{ysize}, $hsh{channels},
$hsh{maxcolors} || 256);
}
+ elsif ($hsh{bits} eq 'double') {
+ $self->{IMG} = i_img_double_new($hsh{xsize}, $hsh{ysize}, $hsh{channels});
+ }
elsif ($hsh{bits} == 16) {
$self->{IMG} = i_img_16_new($hsh{xsize}, $hsh{ysize}, $hsh{channels});
}
the palette, the image will be internally converted to a normal image.
For improved color precision you can use the bits parameter to specify
-16 bites per channel:
+16 bit per channel:
$img = Imager->new(xsize=>200, ysize=>200, channels=>3, bits=>16);
-Note that as of this writing all functions should work on 16-bit
-images, but at only 8-bit/channel precision.
+or for even more precision:
+
+ $img = Imager->new(xsize=>200, ysize=>200, channels=>3, bits=>'double');
+
+to get an image that uses a double for each channel.
+
+Note that as of this writing all functions should work on images with
+more than 8-bits/channel, but many will only work at only
+8-bit/channel precision.
-Currently only 8 and 16/bit per channel image types are available,
-this may change later.
+Currently only 8-bit, 16-bit, and double per channel image types are
+available, this may change later.
Color objects are created by calling the Imager::Color->new()
method:
int y
int ch
+Imager::ImgRaw
+i_img_double_new(x, y, ch)
+ int x
+ int y
+ int ch
+
undef_int
i_tags_addn(im, name, code, idata)
Imager::ImgRaw im
datatypes.c
feat.h
img16.c
+imgdouble.c Implements double/sample images
io.c
io.h
log.c
t/t01introvert.t
t/t020masked.t
t/t021sixteen.t
+t/t022double.t Test double/sample images
t/t05error.t
t/t101jpeg.t
t/t102png.t
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);
+ bmp.o tga.o color.o fills.o imgdouble.o);
%opts=(
'NAME' => 'Imager',
/* a paletted image might have one bit per sample */
i_8_bits = 8,
i_16_bits = 16,
- i_double_bits = 64
+ i_double_bits = sizeof(double) * 8,
} i_img_bits_t;
typedef struct {
int w, int h);
extern i_img *i_img_16_new(int x, int y, int ch);
extern i_img *i_img_16_new_low(i_img *im, int x, int y, int ch);
+extern i_img *i_img_double_new(int x, int y, int ch);
+extern i_img *i_img_double_new_low(i_img *im, int x, int y, int ch);
#ifdef HAVE_LIBJPEG
i_img *
=item i_img_16_new(int x, int y, int ch)
Creates a new 16-bit per sample image.
+
+=cut
*/
i_img *i_img_16_new_low(i_img *im, int x, int y, int ch) {
mm_log((1,"i_img_16_new(x %d, y %d, ch %d)\n", x, y, ch));
#use Data::Dumper;
$loaded = 1;
print "ok 1\n";
-init_log("testout/t021sixteen.t", 1);
+init_log("testout/t021sixteen.log", 1);
use Imager::Color::Float;