jpeg.cxx   jpeg.cxx 
skipping to change at line 415 skipping to change at line 415
if (setjmp(err.buf)) if (setjmp(err.buf))
vigra_fail( "error in jpeg_set_quality()" ); vigra_fail( "error in jpeg_set_quality()" );
jpeg_set_quality( &info, quality, TRUE ); jpeg_set_quality( &info, quality, TRUE );
} }
// enhance the quality a little bit // enhance the quality a little bit
for ( unsigned int i = 0; i < MAX_COMPONENTS; ++i ) { for ( unsigned int i = 0; i < MAX_COMPONENTS; ++i ) {
info.comp_info[i].h_samp_factor = 1; info.comp_info[i].h_samp_factor = 1;
info.comp_info[i].v_samp_factor = 1; info.comp_info[i].v_samp_factor = 1;
} }
#ifdef C_ARITH_CODING_SUPPORTED
info.arith_code = TRUE;
#endif
#ifdef ENTROPY_OPT_SUPPORTED #ifdef ENTROPY_OPT_SUPPORTED
info.optimize_coding = TRUE; info.optimize_coding = TRUE;
#endif #endif
info.dct_method = JDCT_FLOAT; info.dct_method = JDCT_FLOAT;
// start the compression // start the compression
if (setjmp(err.buf)) if (setjmp(err.buf))
vigra_fail( "error in jpeg_start_compress()" ); vigra_fail( "error in jpeg_start_compress()" );
jpeg_start_compress( &info, TRUE ); jpeg_start_compress( &info, TRUE );
skipping to change at line 471 skipping to change at line 468
{ {
VIGRA_IMPEX_FINALIZED(pimpl->finalized); VIGRA_IMPEX_FINALIZED(pimpl->finalized);
pimpl->components = bands; pimpl->components = bands;
} }
void JPEGEncoder::setCompressionType( const std::string & comp, void JPEGEncoder::setCompressionType( const std::string & comp,
int quality ) int quality )
{ {
VIGRA_IMPEX_FINALIZED(pimpl->finalized); VIGRA_IMPEX_FINALIZED(pimpl->finalized);
if ( comp == "LOSSLESS" ) if ( comp == "LOSSLESS" )
vigra_fail( "lossless encoding is not supported by" vigra_fail( "lossless encoding is not supported by your jpeg li
" the jpeg implementation impex uses." ); brary." );
if ( comp == "JPEG_ARITH" )
#ifdef C_ARITH_CODING_SUPPORTED
pimpl->info.arith_code = TRUE;
#else
vigra_fail( "arithmetic encoding is not supported by your jpeg
library." );
#endif
pimpl->quality = quality; pimpl->quality = quality;
} }
void JPEGEncoder::setPixelType( const std::string & pixelType ) void JPEGEncoder::setPixelType( const std::string & pixelType )
{ {
VIGRA_IMPEX_FINALIZED(pimpl->finalized); VIGRA_IMPEX_FINALIZED(pimpl->finalized);
if ( pixelType != "UINT8" ) if ( pixelType != "UINT8" )
vigra_precondition( false, "only UINT8 pixels are supported." ) ; vigra_precondition( false, "only UINT8 pixels are supported." ) ;
} }
 End of changes. 2 change blocks. 
5 lines changed or deleted 9 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/