summaryrefslogtreecommitdiff
path: root/src/libjpeg/jcmarker.c
diff options
context:
space:
mode:
authorscuri <scuri>2009-08-20 01:10:27 +0000
committerscuri <scuri>2009-08-20 01:10:27 +0000
commit83b3c8b629d96f5fdf754d35d5f4f5369dbfef1d (patch)
tree81242227fb731da262139283c301e58f861e9727 /src/libjpeg/jcmarker.c
parentb014c9fa4544c111796aed1406e704338bacf456 (diff)
*** empty log message ***
Diffstat (limited to 'src/libjpeg/jcmarker.c')
-rw-r--r--src/libjpeg/jcmarker.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/libjpeg/jcmarker.c b/src/libjpeg/jcmarker.c
index 3d1e6c6..54d109a 100644
--- a/src/libjpeg/jcmarker.c
+++ b/src/libjpeg/jcmarker.c
@@ -285,13 +285,13 @@ emit_sof (j_compress_ptr cinfo, JPEG_MARKER code)
emit_2bytes(cinfo, 3 * cinfo->num_components + 2 + 5 + 1); /* length */
/* Make sure image isn't bigger than SOF field can handle */
- if ((long) cinfo->image_height > 65535L ||
- (long) cinfo->image_width > 65535L)
+ if ((long) cinfo->jpeg_height > 65535L ||
+ (long) cinfo->jpeg_width > 65535L)
ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) 65535);
emit_byte(cinfo, cinfo->data_precision);
- emit_2bytes(cinfo, (int) cinfo->image_height);
- emit_2bytes(cinfo, (int) cinfo->image_width);
+ emit_2bytes(cinfo, (int) cinfo->jpeg_height);
+ emit_2bytes(cinfo, (int) cinfo->jpeg_width);
emit_byte(cinfo, cinfo->num_components);
@@ -529,7 +529,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 */