mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Merge pull request #5127 from radarhere/warnings
Fixed warnings assigning to "unsigned char *" from "char *"
This commit is contained in:
commit
2635a4859d
|
@ -1084,7 +1084,7 @@ font_render(FontObject* self, PyObject* args)
|
|||
if (color) {
|
||||
/* target[RGB] returns the color, target[A] returns the mask */
|
||||
/* target bands get split again in ImageDraw.text */
|
||||
target = im->image[yy] + xx * 4;
|
||||
target = (unsigned char*)im->image[yy] + xx * 4;
|
||||
} else {
|
||||
target = im->image8[yy] + xx;
|
||||
}
|
||||
|
|
|
@ -198,7 +198,7 @@ ImagingGetExtrema(Imaging im, void *extrema)
|
|||
imin = imax = v;
|
||||
for (y = 0; y < im->ysize; y++) {
|
||||
for (x = 0; x < im->xsize; x++) {
|
||||
pixel = im->image[y] + x * sizeof(v);
|
||||
pixel = (UINT8*)im->image[y] + x * sizeof(v);
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
v = pixel[0] + (pixel[1] << 8);
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue
Block a user