rename TRANSPOSE_ROTATE_180 to TRANSVERSE

This commit is contained in:
Alexander 2017-09-11 22:58:22 +03:00
parent fd297fe588
commit 29515f59bb
4 changed files with 9 additions and 9 deletions

View File

@ -150,7 +150,7 @@ ROTATE_90 = 2
ROTATE_180 = 3
ROTATE_270 = 4
TRANSPOSE = 5
TRANSPOSE_ROTATE_180 = 6
TRANSVERSE = 6
# transforms
AFFINE = 0

View File

@ -1674,7 +1674,7 @@ _transpose(ImagingObject* self, PyObject* args)
case 2: /* rotate 90 */
case 4: /* rotate 270 */
case 5: /* transpose */
case 6: /* transpose and rotate 180 */
case 6: /* transverse */
imOut = ImagingNewDirty(imIn->mode, imIn->ysize, imIn->xsize);
break;
default:
@ -1703,7 +1703,7 @@ _transpose(ImagingObject* self, PyObject* args)
(void) ImagingTranspose(imOut, imIn);
break;
case 6:
(void) ImagingTransposeRotate180(imOut, imIn);
(void) ImagingTransverse(imOut, imIn);
break;
}

View File

@ -178,7 +178,7 @@ ImagingTranspose(Imaging imOut, Imaging imIn)
Imaging
ImagingTransposeRotate180(Imaging imOut, Imaging imIn)
ImagingTransverse(Imaging imOut, Imaging imIn)
{
ImagingSectionCookie cookie;
int x, y, xr, yr, xx, yy, xxsize, yysize;
@ -191,7 +191,7 @@ ImagingTransposeRotate180(Imaging imOut, Imaging imIn)
ImagingCopyInfo(imOut, imIn);
#define TRANSPOSE(INT, image) \
#define TRANSVERSE(INT, image) \
for (y = 0; y < imIn->ysize; y += ROTATE_CHUNK) { \
for (x = 0; x < imIn->xsize; x += ROTATE_CHUNK) { \
yysize = y + ROTATE_CHUNK < imIn->ysize ? y + ROTATE_CHUNK : imIn->ysize; \
@ -216,13 +216,13 @@ ImagingTransposeRotate180(Imaging imOut, Imaging imIn)
ImagingSectionEnter(&cookie);
if (imIn->image8)
TRANSPOSE(UINT8, image8)
TRANSVERSE(UINT8, image8)
else
TRANSPOSE(INT32, image32)
TRANSVERSE(INT32, image32)
ImagingSectionLeave(&cookie);
#undef TRANSPOSE
#undef TRANSVERSE
return imOut;
}

View File

@ -292,7 +292,7 @@ extern Imaging ImagingRotate90(Imaging imOut, Imaging imIn);
extern Imaging ImagingRotate180(Imaging imOut, Imaging imIn);
extern Imaging ImagingRotate270(Imaging imOut, Imaging imIn);
extern Imaging ImagingTranspose(Imaging imOut, Imaging imIn);
extern Imaging ImagingTransposeRotate180(Imaging imOut, Imaging imIn);
extern Imaging ImagingTransverse(Imaging imOut, Imaging imIn);
extern Imaging ImagingResample(Imaging imIn, int xsize, int ysize, int filter, float box[4]);
extern Imaging ImagingTransform(
Imaging imOut, Imaging imIn, int method, int x0, int y0, int x1, int y1,