Add pixel access for BGRa

This commit is contained in:
Arjen Nienhuis 2016-08-07 02:21:22 +02:00
parent 536342c17c
commit 7fb0aaad6a
3 changed files with 4 additions and 2 deletions

View File

@ -289,6 +289,7 @@ mode_map = {'1': _PyAccess8,
'YCbCr': _PyAccess32_3, 'YCbCr': _PyAccess32_3,
'RGBA': _PyAccess32_4, 'RGBA': _PyAccess32_4,
'RGBa': _PyAccess32_4, 'RGBa': _PyAccess32_4,
'BGRa': _PyAccess32_4,
'RGBX': _PyAccess32_4, 'RGBX': _PyAccess32_4,
'CMYK': _PyAccess32_4, 'CMYK': _PyAccess32_4,
'F': _PyAccessF, 'F': _PyAccessF,

View File

@ -8,7 +8,7 @@ modes = [
"I", "I;16", "I;16L", "I;16B", "I;32L", "I;32B", "I", "I;16", "I;16L", "I;16B", "I;32L", "I;32B",
"F", "F",
"P", "PA", "P", "PA",
"RGB", "RGBA", "RGBa", "RGBX", "RGB", "RGBA", "RGBa", "RGBX", "BGRa",
"CMYK", "CMYK",
"YCbCr", "YCbCr",
"LAB", "HSV", "LAB", "HSV",

View File

@ -14,7 +14,7 @@
/* use Tests/make_hash.py to calculate these values */ /* use Tests/make_hash.py to calculate these values */
#define ACCESS_TABLE_SIZE 27 #define ACCESS_TABLE_SIZE 27
#define ACCESS_TABLE_HASH 3078 #define ACCESS_TABLE_HASH 3154
static struct ImagingAccessInstance access_table[ACCESS_TABLE_SIZE]; static struct ImagingAccessInstance access_table[ACCESS_TABLE_SIZE];
@ -235,6 +235,7 @@ ImagingAccessInit()
ADD("RGB", line_32, get_pixel_32, put_pixel_32); ADD("RGB", line_32, get_pixel_32, put_pixel_32);
ADD("RGBA", line_32, get_pixel_32, put_pixel_32); ADD("RGBA", line_32, get_pixel_32, put_pixel_32);
ADD("RGBa", line_32, get_pixel_32, put_pixel_32); ADD("RGBa", line_32, get_pixel_32, put_pixel_32);
ADD("BGRa", line_32, get_pixel_32, put_pixel_32);
ADD("RGBX", line_32, get_pixel_32, put_pixel_32); ADD("RGBX", line_32, get_pixel_32, put_pixel_32);
ADD("CMYK", line_32, get_pixel_32, put_pixel_32); ADD("CMYK", line_32, get_pixel_32, put_pixel_32);
ADD("YCbCr", line_32, get_pixel_32, put_pixel_32); ADD("YCbCr", line_32, get_pixel_32, put_pixel_32);