add packaging
[platform/upstream/tiff.git] / packaging / tiff-bigendian.patch
1 --- tiff-4.0.2/test/raw_decode.c.xx     2012-06-28 11:48:43.000000000 +0200
2 +++ tiff-4.0.2/test/raw_decode.c        2012-06-28 12:15:46.000000000 +0200
3 @@ -85,9 +85,9 @@
4  static int check_rgba_pixel( int pixel, int red, int green, int blue, int alpha, unsigned char *buffer ) {
5         /* RGBA images are upside down - adjust for normal ordering */
6         int adjusted_pixel = pixel % 128 + (127 - (pixel/128)) * 128;
7 -       unsigned char *rgba = buffer + 4 * adjusted_pixel;
8 -       
9 -       if( rgba[0] == red && rgba[1] == green && rgba[2] == blue && rgba[3] == alpha ) {
10 +       unsigned int *rgba = (unsigned int*)(buffer + 4 * adjusted_pixel);
11 +
12 +       if( TIFFGetR(*rgba) == red && TIFFGetG(*rgba) == green && TIFFGetB(*rgba) == blue && TIFFGetA(*rgba) == alpha ) {
13                 return 0;
14         }
15