diff --git a/darwin/image.m b/darwin/image.m index cf2bdf13..a4b322c7 100644 --- a/darwin/image.m +++ b/darwin/image.m @@ -34,7 +34,7 @@ void uiImageAppend(uiImage *i, void *pixels, int pixelWidth, int pixelHeight, in { NSBitmapImageRep *repCalibrated, *repsRGB; uint8_t *swizzled, *bp, *sp; - int n, l; + int x, y; unsigned char *pix[1]; // OS X demands that R and B are in the opposite order from what we expect @@ -43,8 +43,8 @@ void uiImageAppend(uiImage *i, void *pixels, int pixelWidth, int pixelHeight, in swizzled = (uint8_t *) uiprivAlloc((byteStride * pixelHeight) * sizeof (uint8_t), "uint8_t[]"); bp = (uint8_t *) pixels; sp = swizzled; - for (l = 0; l < pixelHeight; l++){ - for (n = 0; n < pixelWidth; n++) { + for (y = 0; y < pixelHeight; y++){ + for (x = 0; x < pixelWidth; x++) { sp[0] = bp[2]; sp[1] = bp[1]; sp[2] = bp[0];