mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Resolved segfaults
This commit is contained in:
parent
78995c8024
commit
4f3b44960f
|
@ -11,17 +11,6 @@ class TestFromQPixmap(PillowQPixmapTestCase, PillowTestCase):
|
||||||
# Qt saves all pixmaps as rgb
|
# Qt saves all pixmaps as rgb
|
||||||
self.assert_image_equal(result, expected.convert('RGB'))
|
self.assert_image_equal(result, expected.convert('RGB'))
|
||||||
|
|
||||||
def test_sanity_1(self):
|
def test_sanity(self):
|
||||||
self.roundtrip(hopper('1'))
|
for mode in ('1', 'RGB', 'RGBA', 'L', 'P'):
|
||||||
|
self.roundtrip(hopper(mode))
|
||||||
def test_sanity_rgb(self):
|
|
||||||
self.roundtrip(hopper('RGB'))
|
|
||||||
|
|
||||||
def test_sanity_rgba(self):
|
|
||||||
self.roundtrip(hopper('RGBA'))
|
|
||||||
|
|
||||||
def test_sanity_l(self):
|
|
||||||
self.roundtrip(hopper('L'))
|
|
||||||
|
|
||||||
def test_sanity_p(self):
|
|
||||||
self.roundtrip(hopper('P'))
|
|
||||||
|
|
|
@ -982,8 +982,8 @@ static void
|
||||||
p2pa(UINT8* out, const UINT8* in, int xsize, const UINT8* palette)
|
p2pa(UINT8* out, const UINT8* in, int xsize, const UINT8* palette)
|
||||||
{
|
{
|
||||||
int x;
|
int x;
|
||||||
for (x = 0; x < xsize; x++, in+=4) {
|
for (x = 0; x < xsize; x++, in++) {
|
||||||
const UINT8* rgba = &palette[in[0] * 4];
|
const UINT8* rgba = &palette[in[0]];
|
||||||
*out++ = in[0];
|
*out++ = in[0];
|
||||||
*out++ = in[0];
|
*out++ = in[0];
|
||||||
*out++ = in[0];
|
*out++ = in[0];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user