mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 04:07:21 +03:00
split out ImagingResampleInner from ImagingResample
This commit is contained in:
parent
9842505a60
commit
2c2bdd80ef
|
@ -547,11 +547,16 @@ typedef Imaging (*ResampleFunction)(Imaging imOut, Imaging imIn,
|
|||
float x0, float x1, struct filter *filterp);
|
||||
|
||||
|
||||
Imaging
|
||||
ImagingResampleInner(Imaging imIn, int xsize, int ysize,
|
||||
struct filter *filterp, float box[4],
|
||||
ResampleFunction ResampleHorizontal,
|
||||
ResampleFunction ResampleVertical);
|
||||
|
||||
|
||||
Imaging
|
||||
ImagingResample(Imaging imIn, int xsize, int ysize, int filter, float box[4])
|
||||
{
|
||||
Imaging imTemp = NULL;
|
||||
Imaging imOut = NULL;
|
||||
struct filter *filterp;
|
||||
ResampleFunction ResampleHorizontal;
|
||||
ResampleFunction ResampleVertical;
|
||||
|
@ -603,6 +608,20 @@ ImagingResample(Imaging imIn, int xsize, int ysize, int filter, float box[4])
|
|||
);
|
||||
}
|
||||
|
||||
return ImagingResampleInner(imIn, xsize, ysize, filterp, box,
|
||||
ResampleHorizontal, ResampleVertical);
|
||||
}
|
||||
|
||||
|
||||
Imaging
|
||||
ImagingResampleInner(Imaging imIn, int xsize, int ysize,
|
||||
struct filter *filterp, float box[4],
|
||||
ResampleFunction ResampleHorizontal,
|
||||
ResampleFunction ResampleVertical)
|
||||
{
|
||||
Imaging imTemp = NULL;
|
||||
Imaging imOut = NULL;
|
||||
|
||||
/* two-pass resize, first pass */
|
||||
if (box[0] || box[2] != xsize) {
|
||||
imTemp = ImagingNew(imIn->mode, xsize, imIn->ysize);
|
||||
|
|
Loading…
Reference in New Issue
Block a user