diff --git a/src/_imaging.c b/src/_imaging.c index 46304b9e80a..1f8ca0c2702 100644 --- a/src/_imaging.c +++ b/src/_imaging.c @@ -730,8 +730,8 @@ _new(PyObject *self, PyObject *args) { return NULL; } - return PyImagingNew( - ImagingNew(mode, (ImagingNewParams){xsize, ysize, depth, bands})); + return PyImagingNew(ImagingNew(mode, (ImagingNewParams){xsize, ysize, depth, bands}) + ); } static PyObject * @@ -953,7 +953,8 @@ _color_lut_3d(ImagingObject *self, PyObject *args) { } imOut = ImagingNewDirty( - mode, (ImagingNewParams){self->image->xsize, self->image->ysize}); + mode, (ImagingNewParams){self->image->xsize, self->image->ysize} + ); if (!imOut) { free(prepared_table); return NULL; @@ -1765,8 +1766,9 @@ _quantize(ImagingObject *self, PyObject *args) { if (!self->image->xsize || !self->image->ysize) { /* no content; return an empty image */ - return PyImagingNew(ImagingNew( - "P", (ImagingNewParams){self->image->xsize, self->image->ysize})); + return PyImagingNew( + ImagingNew("P", (ImagingNewParams){self->image->xsize, self->image->ysize}) + ); } return PyImagingNew(ImagingQuantize(self->image, colours, method, kmeans)); @@ -2159,7 +2161,8 @@ _transpose(ImagingObject *self, PyObject *args) { case 3: /* rotate 180 */ imOut = ImagingNewDirty( imIn->mode, - (ImagingNewParams){imIn->xsize, imIn->ysize, imIn->depth, imIn->bands}); + (ImagingNewParams){imIn->xsize, imIn->ysize, imIn->depth, imIn->bands} + ); break; case 2: /* rotate 90 */ case 4: /* rotate 270 */ @@ -2167,7 +2170,8 @@ _transpose(ImagingObject *self, PyObject *args) { case 6: /* transverse */ imOut = ImagingNewDirty( imIn->mode, - (ImagingNewParams){imIn->ysize, imIn->xsize, imIn->depth, imIn->bands}); + (ImagingNewParams){imIn->ysize, imIn->xsize, imIn->depth, imIn->bands} + ); break; default: PyErr_SetString(PyExc_ValueError, "No such transpose operation"); @@ -2848,7 +2852,8 @@ _font_getmask(ImagingFontObject *self, PyObject *args) { } im = ImagingNew( - self->bitmap->mode, (ImagingNewParams){textwidth(self, text), self->ysize}); + self->bitmap->mode, (ImagingNewParams){textwidth(self, text), self->ysize} + ); if (!im) { free(text); return ImagingError_MemoryError(); diff --git a/src/libImaging/Crop.c b/src/libImaging/Crop.c index 52f9b0a431f..60d10c99b83 100644 --- a/src/libImaging/Crop.c +++ b/src/libImaging/Crop.c @@ -38,7 +38,8 @@ ImagingCrop(Imaging imIn, int sx0, int sy0, int sx1, int sy1) { } imOut = ImagingNewDirty( - imIn->mode, (ImagingNewParams){xsize, ysize, imIn->depth, imIn->bands}); + imIn->mode, (ImagingNewParams){xsize, ysize, imIn->depth, imIn->bands} + ); if (!imOut) { return NULL; } diff --git a/src/libImaging/Geometry.c b/src/libImaging/Geometry.c index 979576a7b7b..f719869ed91 100644 --- a/src/libImaging/Geometry.c +++ b/src/libImaging/Geometry.c @@ -108,7 +108,8 @@ ImagingRotate90(Imaging imOut, Imaging imIn) { memcpy( out + yyy * imIn->pixelsize, in + xxx * imIn->pixelsize, - imIn->pixelsize); + imIn->pixelsize + ); } } } @@ -158,7 +159,8 @@ ImagingTranspose(Imaging imOut, Imaging imIn) { memcpy( out + yyy * imIn->pixelsize, in + xxx * imIn->pixelsize, - imIn->pixelsize); + imIn->pixelsize + ); } } } @@ -210,7 +212,8 @@ ImagingTransverse(Imaging imOut, Imaging imIn) { memcpy( out + yr * imIn->pixelsize, in + xxx * imIn->pixelsize, - imIn->pixelsize); + imIn->pixelsize + ); } } } @@ -293,7 +296,8 @@ ImagingRotate270(Imaging imOut, Imaging imIn) { memcpy( out + yr * imIn->pixelsize, in + xxx * imIn->pixelsize, - imIn->pixelsize); + imIn->pixelsize + ); } } } diff --git a/src/libImaging/Imaging.h b/src/libImaging/Imaging.h index c2e3bb25049..5f412fef931 100644 --- a/src/libImaging/Imaging.h +++ b/src/libImaging/Imaging.h @@ -705,7 +705,8 @@ struct ImagingCodecStateInstance { int xsize, ysize, xoff, yoff; ImagingShuffler shuffle; void (*mb_shuffle)( - UINT8 *dst, const UINT8 *src, Imaging im, ImagingCodecState state); + UINT8 *dst, const UINT8 *src, Imaging im, ImagingCodecState state + ); int bits, bytes; UINT8 *buffer; void *context; diff --git a/src/libImaging/RankFilter.c b/src/libImaging/RankFilter.c index d09b5cc6d10..8aac66b420b 100644 --- a/src/libImaging/RankFilter.c +++ b/src/libImaging/RankFilter.c @@ -85,7 +85,8 @@ MakeRankFunction(UINT8) MakeRankFunction(INT32) MakeRankFunction(FLOAT32) } imOut = ImagingNew( - im->mode, (ImagingNewParams){im->xsize - 2 * margin, im->ysize - 2 * margin}); + im->mode, (ImagingNewParams){im->xsize - 2 * margin, im->ysize - 2 * margin} + ); if (!imOut) { return NULL; } diff --git a/src/libImaging/Reduce.c b/src/libImaging/Reduce.c index 60c87ea900c..bb8ddb92c56 100644 --- a/src/libImaging/Reduce.c +++ b/src/libImaging/Reduce.c @@ -1462,8 +1462,8 @@ ImagingReduce(Imaging imIn, int xscale, int yscale, int box[4]) { imOut = ImagingNewDirty( imIn->mode, - (ImagingNewParams){ - (box[2] + xscale - 1) / xscale, (box[3] + yscale - 1) / yscale} + (ImagingNewParams + ){(box[2] + xscale - 1) / xscale, (box[3] + yscale - 1) / yscale} ); if (!imOut) { return NULL; diff --git a/src/libImaging/Resample.c b/src/libImaging/Resample.c index d4fcdad07b1..3b1e70a6c63 100644 --- a/src/libImaging/Resample.c +++ b/src/libImaging/Resample.c @@ -671,7 +671,8 @@ ImagingResampleInner( } imTemp = ImagingNewDirty( - imIn->mode, (ImagingNewParams){xsize, ybox_last - ybox_first}); + imIn->mode, (ImagingNewParams){xsize, ybox_last - ybox_first} + ); if (imTemp) { ResampleHorizontal( imTemp, imIn, ybox_first, ksize_horiz, bounds_horiz, kk_horiz diff --git a/src/libImaging/Storage.c b/src/libImaging/Storage.c index d74d8a0c1bb..3c2f53f2e58 100644 --- a/src/libImaging/Storage.c +++ b/src/libImaging/Storage.c @@ -191,8 +191,8 @@ ImagingNewPrologueSubtype(const char *mode, ImagingNewParams p, int size) { } else if (strcmp(mode, IMAGING_MODE_MB) == 0) { if (p.bands <= 0 || p.depth <= 0) { - return (Imaging)ImagingError_ValueError( - "multi-band missing bands and depth"); + return (Imaging)ImagingError_ValueError("multi-band missing bands and depth" + ); } im->bands = p.bands; im->depth = p.depth; @@ -236,9 +236,7 @@ ImagingNewPrologueSubtype(const char *mode, ImagingNewParams p, int size) { Imaging ImagingNewPrologue(const char *mode, ImagingNewParams p) { - return ImagingNewPrologueSubtype( - mode, p, sizeof(struct ImagingMemoryInstance) - ); + return ImagingNewPrologueSubtype(mode, p, sizeof(struct ImagingMemoryInstance)); } void @@ -570,8 +568,8 @@ ImagingNew2Dirty(const char *mode, Imaging imOut, Imaging imIn) { } else { /* create new image */ imOut = ImagingNewDirty( - mode, - (ImagingNewParams){imIn->xsize, imIn->ysize, imIn->depth, imIn->bands}); + mode, (ImagingNewParams){imIn->xsize, imIn->ysize, imIn->depth, imIn->bands} + ); if (!imOut) { return NULL; } diff --git a/src/map.c b/src/map.c index c44b19dc092..f3a3ab85d59 100644 --- a/src/map.c +++ b/src/map.c @@ -128,7 +128,8 @@ PyImaging_MapBuffer(PyObject *self, PyObject *args) { im = ImagingNewPrologueSubtype( mode, (ImagingNewParams){xsize, ysize, depth, bands}, - sizeof(ImagingBufferInstance)); + sizeof(ImagingBufferInstance) + ); if (!im) { PyBuffer_Release(&view); return NULL;