mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 02:16:19 +03:00
ImagingNew2 is always Dirty
This commit is contained in:
parent
eb4096ffd5
commit
a519851903
|
@ -1035,7 +1035,7 @@ frompalette(Imaging imOut, Imaging imIn, const char *mode)
|
|||
else
|
||||
return (Imaging) ImagingError_ValueError("conversion not supported");
|
||||
|
||||
imOut = ImagingNew2(mode, imOut, imIn);
|
||||
imOut = ImagingNew2Dirty(mode, imOut, imIn);
|
||||
if (!imOut)
|
||||
return NULL;
|
||||
|
||||
|
@ -1073,7 +1073,7 @@ topalette(Imaging imOut, Imaging imIn, ImagingPalette inpalette, int dither)
|
|||
if (!palette)
|
||||
return (Imaging) ImagingError_ValueError("no palette");
|
||||
|
||||
imOut = ImagingNew2("P", imOut, imIn);
|
||||
imOut = ImagingNew2Dirty("P", imOut, imIn);
|
||||
if (!imOut) {
|
||||
if (palette != inpalette)
|
||||
ImagingPaletteDelete(palette);
|
||||
|
@ -1211,7 +1211,7 @@ tobilevel(Imaging imOut, Imaging imIn, int dither)
|
|||
if (strcmp(imIn->mode, "L") != 0 && strcmp(imIn->mode, "RGB") != 0)
|
||||
return (Imaging) ImagingError_ValueError("conversion not supported");
|
||||
|
||||
imOut = ImagingNew2("1", imOut, imIn);
|
||||
imOut = ImagingNew2Dirty("1", imOut, imIn);
|
||||
if (!imOut)
|
||||
return NULL;
|
||||
|
||||
|
@ -1344,7 +1344,7 @@ convert(Imaging imOut, Imaging imIn, const char *mode,
|
|||
}
|
||||
#endif
|
||||
|
||||
imOut = ImagingNew2(mode, imOut, imIn);
|
||||
imOut = ImagingNew2Dirty(mode, imOut, imIn);
|
||||
if (!imOut)
|
||||
return NULL;
|
||||
|
||||
|
@ -1407,7 +1407,7 @@ ImagingConvertTransparent(Imaging imIn, const char *mode,
|
|||
g = b = r;
|
||||
}
|
||||
|
||||
imOut = ImagingNew2(mode, imOut, imIn);
|
||||
imOut = ImagingNew2Dirty(mode, imOut, imIn);
|
||||
if (!imOut){
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ _copy(Imaging imOut, Imaging imIn)
|
|||
if (!imIn)
|
||||
return (Imaging) ImagingError_ValueError(NULL);
|
||||
|
||||
imOut = ImagingNew2(imIn->mode, imOut, imIn);
|
||||
imOut = ImagingNew2Dirty(imIn->mode, imOut, imIn);
|
||||
if (!imOut)
|
||||
return NULL;
|
||||
|
||||
|
|
|
@ -160,7 +160,7 @@ extern int ImagingNewCount;
|
|||
|
||||
extern Imaging ImagingNew(const char* mode, int xsize, int ysize);
|
||||
extern Imaging ImagingNewDirty(const char* mode, int xsize, int ysize);
|
||||
extern Imaging ImagingNew2(const char* mode, Imaging imOut, Imaging imIn);
|
||||
extern Imaging ImagingNew2Dirty(const char* mode, Imaging imOut, Imaging imIn);
|
||||
extern void ImagingDelete(Imaging im);
|
||||
|
||||
extern Imaging ImagingNewBlock(const char* mode, int xsize, int ysize);
|
||||
|
|
|
@ -436,7 +436,7 @@ ImagingNewBlock(const char* mode, int xsize, int ysize)
|
|||
}
|
||||
|
||||
Imaging
|
||||
ImagingNew2(const char* mode, Imaging imOut, Imaging imIn)
|
||||
ImagingNew2Dirty(const char* mode, Imaging imOut, Imaging imIn)
|
||||
{
|
||||
/* allocate or validate output image */
|
||||
|
||||
|
@ -449,7 +449,7 @@ ImagingNew2(const char* mode, Imaging imOut, Imaging imIn)
|
|||
}
|
||||
} else {
|
||||
/* create new image */
|
||||
imOut = ImagingNew(mode, imIn->xsize, imIn->ysize);
|
||||
imOut = ImagingNewDirty(mode, imIn->xsize, imIn->ysize);
|
||||
if (!imOut)
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user