mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Rename ImagingCopyInfo to ImagingCopyPaletteInfo
This commit is contained in:
parent
e3954aa4ea
commit
f6a05fd22c
|
@ -32,7 +32,7 @@ _copy(Imaging imOut, Imaging imIn)
|
|||
if (!imOut)
|
||||
return NULL;
|
||||
|
||||
ImagingCopyInfo(imOut, imIn);
|
||||
ImagingCopyPaletteInfo(imOut, imIn);
|
||||
|
||||
ImagingSectionEnter(&cookie);
|
||||
if (imIn->block != NULL && imOut->block != NULL)
|
||||
|
|
|
@ -41,7 +41,7 @@ ImagingCrop(Imaging imIn, int sx0, int sy0, int sx1, int sy1)
|
|||
if (!imOut)
|
||||
return NULL;
|
||||
|
||||
ImagingCopyInfo(imOut, imIn);
|
||||
ImagingCopyPaletteInfo(imOut, imIn);
|
||||
|
||||
if (sx0 < 0 || sy0 < 0 || sx1 > imIn->xsize || sy1 > imIn->ysize)
|
||||
(void) ImagingFill(imOut, &zero);
|
||||
|
|
|
@ -144,7 +144,7 @@ ImagingEffectSpread(Imaging imIn, int distance)
|
|||
SPREAD(INT32, image32);
|
||||
}
|
||||
|
||||
ImagingCopyInfo(imOut, imIn);
|
||||
ImagingCopyPaletteInfo(imOut, imIn);
|
||||
|
||||
return imOut;
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ ImagingExpand(Imaging imIn, int xmargin, int ymargin, int mode)
|
|||
}
|
||||
ImagingSectionLeave(&cookie);
|
||||
|
||||
ImagingCopyInfo(imOut, imIn);
|
||||
ImagingCopyPaletteInfo(imOut, imIn);
|
||||
|
||||
return imOut;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ ImagingFlipLeftRight(Imaging imOut, Imaging imIn)
|
|||
if (imIn->xsize != imOut->xsize || imIn->ysize != imOut->ysize)
|
||||
return (Imaging) ImagingError_Mismatch();
|
||||
|
||||
ImagingCopyInfo(imOut, imIn);
|
||||
ImagingCopyPaletteInfo(imOut, imIn);
|
||||
|
||||
ImagingSectionEnter(&cookie);
|
||||
|
||||
|
@ -65,7 +65,7 @@ ImagingFlipTopBottom(Imaging imOut, Imaging imIn)
|
|||
if (imIn->xsize != imOut->xsize || imIn->ysize != imOut->ysize)
|
||||
return (Imaging) ImagingError_Mismatch();
|
||||
|
||||
ImagingCopyInfo(imOut, imIn);
|
||||
ImagingCopyPaletteInfo(imOut, imIn);
|
||||
|
||||
ImagingSectionEnter(&cookie);
|
||||
|
||||
|
@ -90,7 +90,7 @@ ImagingRotate90(Imaging imOut, Imaging imIn)
|
|||
if (imIn->xsize != imOut->ysize || imIn->ysize != imOut->xsize)
|
||||
return (Imaging) ImagingError_Mismatch();
|
||||
|
||||
ImagingCopyInfo(imOut, imIn);
|
||||
ImagingCopyPaletteInfo(imOut, imIn);
|
||||
|
||||
#define ROTATE_90(image) \
|
||||
for (y = 0; y < imIn->ysize; y += ROTATE_CHUNK) { \
|
||||
|
@ -132,7 +132,7 @@ ImagingTranspose(Imaging imOut, Imaging imIn)
|
|||
if (imIn->xsize != imOut->ysize || imIn->ysize != imOut->xsize)
|
||||
return (Imaging) ImagingError_Mismatch();
|
||||
|
||||
ImagingCopyInfo(imOut, imIn);
|
||||
ImagingCopyPaletteInfo(imOut, imIn);
|
||||
|
||||
#define TRANSPOSE(image) \
|
||||
for (y = 0; y < imIn->ysize; y += ROTATE_CHUNK) { \
|
||||
|
@ -173,7 +173,7 @@ ImagingRotate180(Imaging imOut, Imaging imIn)
|
|||
if (imIn->xsize != imOut->xsize || imIn->ysize != imOut->ysize)
|
||||
return (Imaging) ImagingError_Mismatch();
|
||||
|
||||
ImagingCopyInfo(imOut, imIn);
|
||||
ImagingCopyPaletteInfo(imOut, imIn);
|
||||
|
||||
#define ROTATE_180(image)\
|
||||
for (y = 0; y < imIn->ysize; y++, yr--) {\
|
||||
|
@ -209,7 +209,7 @@ ImagingRotate270(Imaging imOut, Imaging imIn)
|
|||
if (imIn->xsize != imOut->ysize || imIn->ysize != imOut->xsize)
|
||||
return (Imaging) ImagingError_Mismatch();
|
||||
|
||||
ImagingCopyInfo(imOut, imIn);
|
||||
ImagingCopyPaletteInfo(imOut, imIn);
|
||||
|
||||
#define ROTATE_270(image) \
|
||||
for (y = 0; y < imIn->ysize; y += ROTATE_CHUNK) { \
|
||||
|
@ -641,7 +641,7 @@ ImagingGenericTransform(
|
|||
if (!imOut || !imIn || strcmp(imIn->mode, imOut->mode) != 0)
|
||||
return (Imaging) ImagingError_ModeError();
|
||||
|
||||
ImagingCopyInfo(imOut, imIn);
|
||||
ImagingCopyPaletteInfo(imOut, imIn);
|
||||
|
||||
ImagingSectionEnter(&cookie);
|
||||
|
||||
|
@ -688,7 +688,7 @@ ImagingScaleAffine(Imaging imOut, Imaging imIn,
|
|||
if (!imOut || !imIn || strcmp(imIn->mode, imOut->mode) != 0)
|
||||
return (Imaging) ImagingError_ModeError();
|
||||
|
||||
ImagingCopyInfo(imOut, imIn);
|
||||
ImagingCopyPaletteInfo(imOut, imIn);
|
||||
|
||||
if (x0 < 0)
|
||||
x0 = 0;
|
||||
|
@ -778,7 +778,7 @@ affine_fixed(Imaging imOut, Imaging imIn,
|
|||
int xx, yy;
|
||||
int a0, a1, a2, a3, a4, a5;
|
||||
|
||||
ImagingCopyInfo(imOut, imIn);
|
||||
ImagingCopyPaletteInfo(imOut, imIn);
|
||||
|
||||
xsize = (int) imIn->xsize;
|
||||
ysize = (int) imIn->ysize;
|
||||
|
@ -880,7 +880,7 @@ ImagingTransformAffine(Imaging imOut, Imaging imIn,
|
|||
following code is used. maybe we should fall back on the slow
|
||||
generic transform engine in this case? */
|
||||
|
||||
ImagingCopyInfo(imOut, imIn);
|
||||
ImagingCopyPaletteInfo(imOut, imIn);
|
||||
|
||||
xsize = (int) imIn->xsize;
|
||||
ysize = (int) imIn->ysize;
|
||||
|
|
|
@ -173,7 +173,7 @@ extern Imaging ImagingNewPrologueSubtype(const char *mode,
|
|||
int xsize, int ysize,
|
||||
int structure_size);
|
||||
|
||||
extern void ImagingCopyInfo(Imaging destination, Imaging source);
|
||||
extern void ImagingCopyPaletteInfo(Imaging destination, Imaging source);
|
||||
|
||||
extern void ImagingHistogramDelete(ImagingHistogram histogram);
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ ImagingModeFilter(Imaging im, int size)
|
|||
|
||||
}
|
||||
|
||||
ImagingCopyInfo(imOut, im);
|
||||
ImagingCopyPaletteInfo(imOut, im);
|
||||
|
||||
return imOut;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ ImagingOffset(Imaging im, int xoffset, int yoffset)
|
|||
if (!imOut)
|
||||
return NULL;
|
||||
|
||||
ImagingCopyInfo(imOut, im);
|
||||
ImagingCopyPaletteInfo(imOut, im);
|
||||
|
||||
/* make offsets positive to avoid negative coordinates */
|
||||
xoffset %= im->xsize;
|
||||
|
|
|
@ -180,7 +180,7 @@ ImagingPoint(Imaging imIn, const char* mode, const void* table)
|
|||
} else
|
||||
point = im_point_32_8;
|
||||
|
||||
ImagingCopyInfo(imOut, imIn);
|
||||
ImagingCopyPaletteInfo(imOut, imIn);
|
||||
|
||||
ImagingSectionEnter(&cookie);
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ ImagingRankFilter(Imaging im, int size, int rank)
|
|||
return (Imaging) ImagingError_ModeError();
|
||||
}
|
||||
|
||||
ImagingCopyInfo(imOut, im);
|
||||
ImagingCopyPaletteInfo(imOut, im);
|
||||
|
||||
return imOut;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
* 1998-10-26 fl Added "I;16" and "I;16B" storage modes (experimental)
|
||||
* 1998-12-29 fl Fixed allocation bug caused by previous fix
|
||||
* 1999-02-03 fl Added "RGBa" and "BGR" modes (experimental)
|
||||
* 2001-04-22 fl Fixed potential memory leak in ImagingCopyInfo
|
||||
* 2001-04-22 fl Fixed potential memory leak in ImagingCopyPaletteInfo
|
||||
* 2003-09-26 fl Added "LA" and "PA" modes (experimental)
|
||||
* 2005-10-02 fl Added image counter
|
||||
*
|
||||
|
@ -458,7 +458,7 @@ ImagingNew2Dirty(const char* mode, Imaging imOut, Imaging imIn)
|
|||
}
|
||||
|
||||
void
|
||||
ImagingCopyInfo(Imaging destination, Imaging source)
|
||||
ImagingCopyPaletteInfo(Imaging destination, Imaging source)
|
||||
{
|
||||
if (source->palette) {
|
||||
if (destination->palette)
|
||||
|
|
Loading…
Reference in New Issue
Block a user