diff options
author | Chia-chi Yeh <chiachi@android.com> | 2010-03-10 17:08:58 +0800 |
---|---|---|
committer | Chia-chi Yeh <chiachi@android.com> | 2010-03-10 17:08:58 +0800 |
commit | aa86859b1035f865147b4f76ad2a9eed7ee098a5 (patch) | |
tree | df308eb549f002b43e8c28535d93548621fd598b /core/jni/android | |
parent | fe62d04c30e7b3abe408b56c7744c7f547c57640 (diff) | |
download | frameworks_base-aa86859b1035f865147b4f76ad2a9eed7ee098a5.zip frameworks_base-aa86859b1035f865147b4f76ad2a9eed7ee098a5.tar.gz frameworks_base-aa86859b1035f865147b4f76ad2a9eed7ee098a5.tar.bz2 |
YuvImage: jpeg_set_quality() should be called after jpeg_set_defaults().
Change-Id: I6579ad9241dd5ee6aabf54e1a1128d17b4f6b3e6
Diffstat (limited to 'core/jni/android')
-rw-r--r-- | core/jni/android/graphics/YuvToJpegEncoder.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/core/jni/android/graphics/YuvToJpegEncoder.cpp b/core/jni/android/graphics/YuvToJpegEncoder.cpp index 819cce8..0a0c5b3 100644 --- a/core/jni/android/graphics/YuvToJpegEncoder.cpp +++ b/core/jni/android/graphics/YuvToJpegEncoder.cpp @@ -49,19 +49,16 @@ bool YuvToJpegEncoder::encode(SkWStream* stream, void* inYuv, int width, void YuvToJpegEncoder::setJpegCompressStruct(jpeg_compress_struct* cinfo, int width, int height, int quality) { - jpeg_set_quality(cinfo, quality, TRUE); - cinfo->image_width = width; cinfo->image_height = height; - cinfo->input_components = 3; cinfo->in_color_space = JCS_YCbCr; jpeg_set_defaults(cinfo); + + jpeg_set_quality(cinfo, quality, TRUE); jpeg_set_colorspace(cinfo, JCS_YCbCr); cinfo->raw_data_in = TRUE; - cinfo->dct_method = JDCT_IFAST; - configSamplingFactors(cinfo); } |