mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-24 16:24:11 +03:00
Renamed variable
This commit is contained in:
parent
ebd3c47425
commit
96bdbc4afe
|
@ -2163,12 +2163,12 @@ static PyObject *
|
|||
_getbbox(ImagingObject *self, PyObject *args) {
|
||||
int bbox[4];
|
||||
|
||||
int consider_alpha = 1;
|
||||
if (!PyArg_ParseTuple(args, "|i", &consider_alpha)) {
|
||||
int alpha_only = 1;
|
||||
if (!PyArg_ParseTuple(args, "|i", &alpha_only)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!ImagingGetBBox(self->image, bbox, consider_alpha)) {
|
||||
if (!ImagingGetBBox(self->image, bbox, alpha_only)) {
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "Imaging.h"
|
||||
|
||||
int
|
||||
ImagingGetBBox(Imaging im, int bbox[4], int consider_alpha) {
|
||||
ImagingGetBBox(Imaging im, int bbox[4], int alpha_only) {
|
||||
/* Get the bounding box for any non-zero data in the image.*/
|
||||
|
||||
int x, y;
|
||||
|
@ -58,7 +58,7 @@ ImagingGetBBox(Imaging im, int bbox[4], int consider_alpha) {
|
|||
INT32 mask = 0xffffffff;
|
||||
if (im->bands == 3) {
|
||||
((UINT8 *)&mask)[3] = 0;
|
||||
} else if (consider_alpha && (
|
||||
} else if (alpha_only && (
|
||||
strcmp(im->mode, "RGBa") == 0 || strcmp(im->mode, "RGBA") == 0 ||
|
||||
strcmp(im->mode, "La") == 0 || strcmp(im->mode, "LA") == 0 ||
|
||||
strcmp(im->mode, "PA") == 0
|
||||
|
|
|
@ -317,7 +317,7 @@ ImagingMerge(const char *mode, Imaging bands[4]);
|
|||
extern int
|
||||
ImagingSplit(Imaging im, Imaging bands[4]);
|
||||
extern int
|
||||
ImagingGetBBox(Imaging im, int bbox[4], int consider_alpha);
|
||||
ImagingGetBBox(Imaging im, int bbox[4], int alpha_only);
|
||||
typedef struct {
|
||||
int x, y;
|
||||
INT32 count;
|
||||
|
|
Loading…
Reference in New Issue
Block a user