[Digikam-devel] [Bug 130996] New: Wish: More control over jpeg options

J.Westveer jwest at melaque.com
Mon Jul 17 21:04:44 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         
           Summary: Wish: More control over jpeg options
           Product: digikam
           Version: 0.9.0-svn
          Platform: unspecified
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: wishlist
          Priority: NOR
         Component: general
        AssignedTo: digikam-devel kde org
        ReportedBy: jwest melaque com


Version:           0.9.0-svn (using KDE 3.5.3, Debian Package 4:3.5.3-1 (testing/unstable))
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.15-1-686-smp

More control options for jpeg creation.

Example, the 'advanced' save option for gimp 2.2 allows control for Optimize,
Smoothing, Progressive, use restart markers, force baseline jpeg, Sub sampling,
DCT method, and editable comment field.

I am really interested in having easy control over Subsampling.  This option was originally in jpeg to help further compress large files by averaging out similar colors, in able to reduce the jpeg file size.  The default value for libjpeg is
2x2, 1x1, 1,1 .  Digikam currently does not set this option, and therefore uses this default.  Breifly, this default option throws away half of the color information, perhaps great for vidio compression, but not for todays high-quality color photography.  

For those who might be impatient as I was, you can quickly add the following to graphics/digikam/libs/dimg/loaders/jpegloader.cpp around line #485, after the line:  jpeg_set_defaults(&cinfo);  to set the subsampling to not compress as much.
 cinfo.comp_info[0].h_samp_factor =  cinfo.comp_info[0].v_samp_factor = 1;

This will give much larger jpeg's as the color information is not as compressed.

references:
http://jpegclub.org/foveon/index2.html
http://www.wfu.edu/~matthews/misc/jpg_vs_gif/JpgCompTest/JpgChromaSub.html
file:///usr/share/doc/libjpeg62-dev/libjpeg.doc

thanks for considering.



More information about the Digikam-devel mailing list