sub init {
@definc{'/usr/include'}=();
- @incs=(qw(/usr/include /usr/local/include /usr/include/freetype /usr/local/include/freetype /usr/include/freetype2 /usr/local/include/freetype2), split /:/, $INCPATH );
+ @incs=(qw(/usr/include /usr/include/freetype2 /usr/local/include/freetype2 /usr/local/include /usr/include/freetype /usr/local/include/freetype), split /:/, $INCPATH );
@libs=(split(/ /, $Config{'libpth'}), split(/:/, $LIBPATH) );
if ($^O =~ /win32/i && $Config{cc} =~ /\bcl\b/i) {
push(@incs, split /;/, $ENV{INCLUDE}) if exists $ENV{INCLUDE};
Imager::i_tags_add($img, "i_yres", 0, undef, 250);
# resolutionunit is centimeters
Imager::i_tags_add($img, "tiff_resolutionunit", 0, undef, 3);
- open(FH,">testout/t106.tiff") || die "cannot open testout/t10.tiff for writing\n";
+ open(FH,">testout/t106.tiff") || die "cannot open testout/t106.tiff for writing\n";
binmode(FH);
my $IO = Imager::io_new_fd(fileno(FH));
i_writetiff_wiol($img, $IO);
#include "tiffio.h"
#include "iolayer.h"
+
/*
=head1 NAME
=cut
*/
+
+#define byteswap_macro(x) \
+ ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \
+ (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))
+
+
/*
=item comp_seek(h, o, w)
newcols = (col+tile_width > width ) ? width-row : tile_width;
for( i_row = 0; i_row < tile_height; i_row++ ) {
for(x = 0; x < newcols; x++) {
- i_color val; /* FIXME: Make sure this works everywhere */
- val.ui = raster[x+tile_width*(tile_height-i_row-1)];
+ i_color val;
+ uint32 temp = raster[x+tile_width*(tile_height-i_row-1)];
+ val.rgba.r = TIFFGetR(temp);
+ val.rgba.g = TIFFGetG(temp);
+ val.rgba.b = TIFFGetB(temp);
+ val.rgba.a = TIFFGetA(temp);
i_ppix(im, col+x, row+i_row, &val);
}
}
for( i_row = 0; i_row < newrows; i_row++ ) {
uint32 x;
for(x = 0; x<width; x++) {
- i_color val; /* FIXME: Make sure this works everywhere */
- val.ui = raster[x+width*(newrows-i_row-1)];
+ i_color val;
+ uint32 temp = raster[x+width*(newrows-i_row-1)];
+ val.rgba.r = TIFFGetR(temp);
+ val.rgba.g = TIFFGetG(temp);
+ val.rgba.b = TIFFGetB(temp);
+ val.rgba.a = TIFFGetA(temp);
i_ppix(im, x, i_row+row, &val);
}
}