remove unnecessary ImagingCopyInfos

This commit is contained in:
Alexander 2017-09-15 00:22:26 +03:00
parent 3b5c2c30be
commit e3954aa4ea
3 changed files with 5 additions and 8 deletions

View File

@ -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];

View File

@ -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++) {

View File

@ -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);