diff --git a/docs/handbook/writing-your-own-file-decoder.rst b/docs/handbook/writing-your-own-file-decoder.rst index f3f34e30d..0763109ab 100644 --- a/docs/handbook/writing-your-own-file-decoder.rst +++ b/docs/handbook/writing-your-own-file-decoder.rst @@ -201,7 +201,8 @@ table describes some commonly used **raw modes**: +-----------+-----------------------------------------------------------------+ | ``BGR`` | 24-bit true colour, stored as (blue, green, red). | +-----------+-----------------------------------------------------------------+ -| ``RGBX`` | 24-bit true colour, stored as (red, green, blue, pad). | +| ``RGBX`` | 24-bit true colour, stored as (red, green, blue, pad). The pad | +| | pixels may vary. | +-----------+-----------------------------------------------------------------+ | ``RGB;L`` | 24-bit true colour, line interleaved (first all red pixels, then| | | all green pixels, finally all blue pixels). | diff --git a/src/libImaging/Unpack.c b/src/libImaging/Unpack.c index 02196d255..ff0df861c 100644 --- a/src/libImaging/Unpack.c +++ b/src/libImaging/Unpack.c @@ -1333,7 +1333,7 @@ static struct { {"RGB", "RGBX;L", 32, unpackRGBAL}, {"RGB", "RGBA;L", 32, unpackRGBAL}, {"RGB", "BGRX", 32, ImagingUnpackBGRX}, - {"RGB", "XRGB", 24, ImagingUnpackXRGB}, + {"RGB", "XRGB", 32, ImagingUnpackXRGB}, {"RGB", "XBGR", 32, ImagingUnpackXBGR}, {"RGB", "YCC;P", 24, ImagingUnpackYCC}, {"RGB", "R", 8, band0}, @@ -1403,7 +1403,7 @@ static struct { {"RGBX", "RGBX;16L", 64, unpackRGBA16L}, {"RGBX", "RGBX;16B", 64, unpackRGBA16B}, {"RGBX", "BGRX", 32, ImagingUnpackBGRX}, - {"RGBX", "XRGB", 24, ImagingUnpackXRGB}, + {"RGBX", "XRGB", 32, ImagingUnpackXRGB}, {"RGBX", "XBGR", 32, ImagingUnpackXBGR}, {"RGBX", "YCC;P", 24, ImagingUnpackYCC}, {"RGBX", "R", 8, band0},