It turned out that when a remote camera fails, a frame is Fill()ed with the signal_loss_colour. However, this is incorrect, since the signal_loss_colour may be in BGR if it's a HTML hex.
By doing an rgb_convert from BGR, the signal loss detection and fill colour both function correctly.
A plain long is also allowed in the database field; since the HTML hex has a specified subpixel order, and a long does not, removing acceptance of long from the contract may be a good idea.
Code: Select all
--- a/src/zm_monitor.cpp
+++ b/src/zm_monitor.cpp
@@ -2693,7 +2693,7 @@ int Monitor::Capture()
{
// Unable to capture image for temporary reason
// Fake a signal loss image
- capture_image->Fill( signal_check_colour );
+ capture_image->Fill(rgb_convert(signal_check_colour, ZM_SUBPIX_ORDER_BGR));
captureResult = 0;
} else {
captureResult = 1;