mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
remove unnecessary ImagingCopyInfos
This commit is contained in:
parent
3b5c2c30be
commit
e3954aa4ea
|
@ -46,8 +46,6 @@ ImagingAlphaComposite(Imaging imDst, Imaging imSrc)
|
|||
if (!imOut)
|
||||
return NULL;
|
||||
|
||||
ImagingCopyInfo(imOut, imDst);
|
||||
|
||||
for (y = 0; y < imDst->ysize; y++) {
|
||||
|
||||
rgba8* dst = (rgba8*) imDst->image[y];
|
||||
|
|
|
@ -26,8 +26,11 @@ ImagingBlend(Imaging imIn1, Imaging imIn2, float alpha)
|
|||
int x, y;
|
||||
|
||||
/* Check arguments */
|
||||
if (!imIn1 || !imIn2 || imIn1->type != IMAGING_TYPE_UINT8)
|
||||
return ImagingError_ModeError();
|
||||
if (!imIn1 || !imIn2 || imIn1->type != IMAGING_TYPE_UINT8
|
||||
|| imIn1->palette || strcmp(imIn1->mode, "1") == 0
|
||||
|| imIn2->palette || strcmp(imIn2->mode, "1") == 0)
|
||||
return ImagingError_ModeError();
|
||||
|
||||
if (imIn1->type != imIn2->type ||
|
||||
imIn1->bands != imIn2->bands ||
|
||||
imIn1->xsize != imIn2->xsize ||
|
||||
|
@ -44,8 +47,6 @@ ImagingBlend(Imaging imIn1, Imaging imIn2, float alpha)
|
|||
if (!imOut)
|
||||
return NULL;
|
||||
|
||||
ImagingCopyInfo(imOut, imIn1);
|
||||
|
||||
if (alpha >= 0 && alpha <= 1.0) {
|
||||
/* Interpolate between bands */
|
||||
for (y = 0; y < imIn1->ysize; y++) {
|
||||
|
|
|
@ -216,8 +216,6 @@ ImagingPointTransform(Imaging imIn, double scale, double offset)
|
|||
if (!imOut)
|
||||
return NULL;
|
||||
|
||||
ImagingCopyInfo(imOut, imIn);
|
||||
|
||||
switch (imIn->type) {
|
||||
case IMAGING_TYPE_INT32:
|
||||
ImagingSectionEnter(&cookie);
|
||||
|
|
Loading…
Reference in New Issue
Block a user