Added colourising of greyscale to EncodeJpeg for frame server.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@621 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2003-07-10 09:54:17 +00:00
parent 3e8ce9b28b
commit 9e312f60d5
1 changed files with 8 additions and 0 deletions

View File

@ -191,6 +191,14 @@ void Image::DecodeJpeg( JOCTET *inbuffer, int inbuffer_size )
void Image::EncodeJpeg( JOCTET *outbuffer, int *outbuffer_size ) const
{
if ( (bool)config.Item( ZM_COLOUR_JPEG_FILES ) && colours == 1 )
{
Image temp_image( *this );
temp_image.Colourise();
temp_image.EncodeJpeg( outbuffer, outbuffer_size );
return;
}
struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
cinfo.err = jpeg_std_error(&jerr);