If you have a good camera, the camera will capture at maximum resolution and then resample to your target resolution. But with cheaps cameras the capture at low resolution will be poor, with a lot of aliasing an noise.
I added the "image.Scale..." line before the Size checking in src/zm_monitor.cpp, line 2486.
Code: Select all
image.Scale( scale=ZM_SCALE_SCALE*camera->Width()/image.Width() );
if ( image.Size() != camera->ImageSize() )
{
Error(( "Captured image does not match expected size, check width, height and colour depth" ));
return( -1 );
}
This scales the image using the width to compute the scale.
I could compare first and stop scaling if the widths are the same, but scale function does this internally, at the begining. So there's no overhead.
After that, it does the size (widht*height*bytesperpixel) comparision. So if the aspect ratio or colour depth are not the expected, zoneminder still gets an error.