http://bugs.gentoo.org/422843 http://pkgs.fedoraproject.org/cgit/libtiff.git/plain/libtiff-4.0.2-bigendian.patch http://pkgs.fedoraproject.org/cgit/libtiff.git/commit/?id=5f9a7dda1bb1991bf36f98ee37700c75433c9738 --- test/raw_decode.c +++ test/raw_decode.c @@ -85,9 +85,9 @@ static int check_rgb_pixel( int pixel, i static int check_rgba_pixel( int pixel, int red, int green, int blue, int alpha, unsigned char *buffer ) { /* RGBA images are upside down - adjust for normal ordering */ int adjusted_pixel = pixel % 128 + (127 - (pixel/128)) * 128; - unsigned char *rgba = buffer + 4 * adjusted_pixel; + unsigned int *rgba = (unsigned int*)(buffer + 4 * adjusted_pixel); - if( rgba[0] == red && rgba[1] == green && rgba[2] == blue && rgba[3] == alpha ) { + if( TIFFGetR(*rgba) == red && TIFFGetG(*rgba) == green && TIFFGetB(*rgba) == blue && TIFFGetA(*rgba) == alpha ) { return 0; }