[Digikam-devel] [Bug 130996] Wish: More control over jpeg options
Gilles Caulier
caulier.gilles at free.fr
Tue Jul 25 12:13:36 BST 2006
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=130996
------- Additional Comments From caulier.gilles free fr 2006-07-25 13:13 -------
SVN commit 566091 by cgilles:
digikam from trunk : DImg:JPEGLoader : set horizontal and vertical Subsampling factor to 1 for a best quality of color picture compression.
CCBUGS: 130996
M +10 -1 jpegloader.cpp
--- trunk/extragear/graphics/digikam/libs/dimg/loaders/jpegloader.cpp #566090:566091
@ -467,11 +467,14 @
uint& h = imageHeight();
unsigned char*& data = imageData();
+ // Size of image.
cinfo.image_width = w;
cinfo.image_height = h;
+
+ // Color components of image in RGB.
cinfo.input_components = 3;
cinfo.in_color_space = JCS_RGB;
-
+
QVariant qualityAttr = imageGetAttribute("quality");
int quality = qualityAttr.isValid() ? qualityAttr.toInt() : 90;
@ -481,6 +484,12 @
quality = 100;
jpeg_set_defaults(&cinfo);
+
+ // B.K.O #130996: set horizontal and vertical Subsampling factor to 1 for a best
+ // quality of color picture compression.
+ cinfo.comp_info[0].h_samp_factor = 1;
+ cinfo.comp_info[0].v_samp_factor = 1;
+
jpeg_set_quality(&cinfo, quality, true);
jpeg_start_compress(&cinfo, true);
More information about the Digikam-devel
mailing list