Summary: | Wish: More control over jpeg options | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | J. Westveer <jwest> |
Component: | Plugin-DImg-JPEG | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | 0.9.0 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 0.9.0 | |
Sentry Crash Report: |
Description
J. Westveer
2006-07-17 22:04:43 UTC
I'm agree with you. The image quality must be preserved when it possible. There is already a file in B.K.O to move the IO file writting setting from setup to the saveas dialog (like Gimp and photoshop do). Look #123649. We will add more JPEG compression options in this dialog later than 0.9.0. But, for 0.9.0, added subsampling options in digikam jpegloader is a good idea. Can you give me a little patch against svn for that. Thanks in advance ! Gilles Caulier 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); |