diff options
Diffstat (limited to 'Build/source/libs/gd/libgd-src/tests/gdimagepixelate/gdimagepixelate.c')
-rw-r--r-- | Build/source/libs/gd/libgd-src/tests/gdimagepixelate/gdimagepixelate.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagepixelate/gdimagepixelate.c b/Build/source/libs/gd/libgd-src/tests/gdimagepixelate/gdimagepixelate.c index 047ac8f446e..f8e6646d05b 100644 --- a/Build/source/libs/gd/libgd-src/tests/gdimagepixelate/gdimagepixelate.c +++ b/Build/source/libs/gd/libgd-src/tests/gdimagepixelate/gdimagepixelate.c @@ -27,28 +27,28 @@ static const int expected_average[][3] = { } \ } while (0) -#define CHECK_PIXELS(im, expected) do { \ - int x, y; \ - for (y = 0; y < (im)->sy; y++) { \ - for (x = 0; x < (im)->sx; x++) { \ - int p = gdImageGetPixel(im, x, y); \ - int r = ((expected)[y/BLOCK_SIZE][x/BLOCK_SIZE]>>16)&0xFF; \ - int g = ((expected)[y/BLOCK_SIZE][x/BLOCK_SIZE]>> 8)&0xFF; \ - int b = ((expected)[y/BLOCK_SIZE][x/BLOCK_SIZE] )&0xFF; \ - if (r != gdImageRed(im, p)) { \ +#define CHECK_PIXELS(im, expected) do { \ + int x, y; \ + for (y = 0; y < (im)->sy; y++) { \ + for (x = 0; x < (im)->sx; x++) { \ + int p = gdImageGetPixel(im, x, y); \ + int r = ((expected)[y/BLOCK_SIZE][x/BLOCK_SIZE]>>16)&0xFF; \ + int g = ((expected)[y/BLOCK_SIZE][x/BLOCK_SIZE]>> 8)&0xFF; \ + int b = ((expected)[y/BLOCK_SIZE][x/BLOCK_SIZE] )&0xFF; \ + if (r != gdImageRed(im, p)) { \ gdTestErrorMsg("Red %x is expected, but %x\n", r, gdImageRed(im, p)); \ - return 0; \ - } \ - if (g != gdImageGreen(im, p)) { \ + return 0; \ + } \ + if (g != gdImageGreen(im, p)) { \ gdTestErrorMsg("Green %x is expected, but %x\n", g, gdImageGreen(im, p)); \ - return 0; \ - } \ - if (b != gdImageBlue(im, p)) { \ + return 0; \ + } \ + if (b != gdImageBlue(im, p)) { \ gdTestErrorMsg("Blue %x is expected, but %x\n", b, gdImageBlue(im, p)); \ - return 0; \ - } \ - } \ - } \ + return 0; \ + } \ + } \ + } \ } while (0) static int testPixelate(gdImagePtr im) |