Only default to BGRA when colours are > 1.

This commit is contained in:
Isaac Connor
2021-05-03 13:17:58 -04:00
parent bf72bb2a22
commit 90dff85e40

View File

@@ -174,7 +174,7 @@ Image::Image(int p_width, int p_height, int p_colours, int p_subpixelorder, uint
} else {
AllocImgBuffer(size);
}
if (!subpixelorder) {
if (!subpixelorder and colours>1) {
// Default to RGBA when no subpixelorder is specified.
subpixelorder = ZM_SUBPIX_ORDER_RGBA;
}
@@ -205,7 +205,7 @@ Image::Image(int p_width, int p_linesize, int p_height, int p_colours, int p_sub
} else {
AllocImgBuffer(size);
}
if (!subpixelorder) {
if (!subpixelorder and colours>1) {
// Default to RGBA when no subpixelorder is specified.
subpixelorder = ZM_SUBPIX_ORDER_RGBA;
}