diff --git a/jcmarker.c b/jcmarker.c index 06fe6239..e5b627fb 100644 --- a/jcmarker.c +++ b/jcmarker.c @@ -3,6 +3,7 @@ * * This file was part of the Independent JPEG Group's software: * Copyright (C) 1991-1998, Thomas G. Lane. + * Modified 2003-2010 by Guido Vollbeding. * Modifications: * Copyright (C) 2010, D. R. Commander. * For conditions of distribution and use, see the accompanying README file. @@ -532,7 +533,10 @@ write_frame_header (j_compress_ptr cinfo) /* Emit the proper SOF marker */ if (cinfo->arith_code) { - emit_sof(cinfo, M_SOF9); /* SOF code for arithmetic coding */ + if (cinfo->progressive_mode) + emit_sof(cinfo, M_SOF10); /* SOF code for progressive arithmetic */ + else + emit_sof(cinfo, M_SOF9); /* SOF code for sequential arithmetic */ } else { if (cinfo->progressive_mode) emit_sof(cinfo, M_SOF2); /* SOF code for progressive Huffman */