mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 09:44:31 +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)
|
if (!imOut)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
ImagingCopyInfo(imOut, imDst);
|
|
||||||
|
|
||||||
for (y = 0; y < imDst->ysize; y++) {
|
for (y = 0; y < imDst->ysize; y++) {
|
||||||
|
|
||||||
rgba8* dst = (rgba8*) imDst->image[y];
|
rgba8* dst = (rgba8*) imDst->image[y];
|
||||||
|
|
|
@ -26,8 +26,11 @@ ImagingBlend(Imaging imIn1, Imaging imIn2, float alpha)
|
||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
/* Check arguments */
|
/* Check arguments */
|
||||||
if (!imIn1 || !imIn2 || imIn1->type != IMAGING_TYPE_UINT8)
|
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();
|
return ImagingError_ModeError();
|
||||||
|
|
||||||
if (imIn1->type != imIn2->type ||
|
if (imIn1->type != imIn2->type ||
|
||||||
imIn1->bands != imIn2->bands ||
|
imIn1->bands != imIn2->bands ||
|
||||||
imIn1->xsize != imIn2->xsize ||
|
imIn1->xsize != imIn2->xsize ||
|
||||||
|
@ -44,8 +47,6 @@ ImagingBlend(Imaging imIn1, Imaging imIn2, float alpha)
|
||||||
if (!imOut)
|
if (!imOut)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
ImagingCopyInfo(imOut, imIn1);
|
|
||||||
|
|
||||||
if (alpha >= 0 && alpha <= 1.0) {
|
if (alpha >= 0 && alpha <= 1.0) {
|
||||||
/* Interpolate between bands */
|
/* Interpolate between bands */
|
||||||
for (y = 0; y < imIn1->ysize; y++) {
|
for (y = 0; y < imIn1->ysize; y++) {
|
||||||
|
|
|
@ -216,8 +216,6 @@ ImagingPointTransform(Imaging imIn, double scale, double offset)
|
||||||
if (!imOut)
|
if (!imOut)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
ImagingCopyInfo(imOut, imIn);
|
|
||||||
|
|
||||||
switch (imIn->type) {
|
switch (imIn->type) {
|
||||||
case IMAGING_TYPE_INT32:
|
case IMAGING_TYPE_INT32:
|
||||||
ImagingSectionEnter(&cookie);
|
ImagingSectionEnter(&cookie);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user