[Digikam-devel] [Bug 152192] resize really bad qualitatively

Gilles Caulier caulier.gilles at gmail.com
Fri Nov 16 06:55:35 GMT 2007


------- 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=152192         




------- Additional Comments From caulier.gilles gmail com  2007-11-16 07:55 -------
I have found a speed way to fix this problem. In CImg library, there is an algorithm to resize image like we want. This one do not dependant of Greystoration algorithm used in Restoration mode.

To be clear, CImg is a low level image manipulation library. Greystoration is an algorithm witch use CImg.

In my Qt Greycstoration interface, there is already a simpleResize() method witch do not use Greycstoration algorithm. There is a parameter to set the interpolation method: 

    //! Return a resized image.
    /**
       \param pdx = Number of columns (new size along the X-axis).
       \param pdy = Number of rows (new size along the Y-axis).
       \param pdz = Number of slices (new size along the Z-axis).
       \param pdv = Number of vector-channels (new size along the V-axis).
       \param interp = Resizing type :
       - -1 = no interpolation : raw memory resizing.
       - 0 = no interpolation : additional space is filled with 0.
       - 1 = bloc interpolation (nearest point).
       - 2 = mosaic : image is repeated if necessary.
       - 3 = linear interpolation.
       - 4 = grid interpolation.
       - 5 = bi-cubic interpolation.
       \note If pd[x,y,z,v]<0, it corresponds to a percentage of 
       the original size (the default value is -100).
    **/
    CImg get_resize(const int pdx=-100, const int pdy=-100, 
                    const int pdz=-100, const int pdv=-100,
                    const int interp=1, const int border_condition=-1);

I will provide a patch to test this way...

Gilles



More information about the Digikam-devel mailing list