mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-03-16 12:58:00 -04:00
Only default to BGRA when colours are > 1.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user