[Kde-graphics-devel] Descriptions of new stuff

Lubos Lunak l.lunak at suse.cz
Thu Dec 16 16:06:48 CET 2004


On Wednesday 15 of December 2004 18:40, Mosfet wrote:
> On Wednesday 15 December 2004 11:14 am, Lubos Lunak wrote:
> >  Are you sure the imlib algorithm actually does smoothscale? Enlarged
> > pictures in Kuickshow look just as blocky as with Qt. Since you called
> > that section "smoothscaling" I thought it could be used instead of the
> > ImageMagick stuff, but if only as good as Qt then I'm afraid it won't
> > help in this specific case.
>
> Well, it is smoothscaling. I don't know about Kuickshow but I assume it's
> using Imlib smoothscaling. You just don't like the quality of Qt and Imlib
> smoothscaling ;-) That's okay, I'm not really arguing with you here. It's
> not supposed to be high quality it's supposed to be as fast as possible
> while producing okay, (but not great), results. Please read my previous
> mail.

 Well well ... maybe I should have been less scared of the Imlib2 code when I 
was looking for a place to steal the scaling from :(. Apologies for 
doubting :). After trying the code I see I can throw the ImageMagick code out 
from Gwenview. The Mitchell filter is still slightly better when it comes to 
quality, but probably only freaks would notice that anyway. I guess it'd be 
difficult to find something better than the Imlib2 code when it's almost as 
fast as just sampling and about as good as the Triangle filter.

 So I'd like to use your code in Gwenview as the default scaling code. 
However, I don't see anything like a license anywhere in your sources.

 Also, I have a question about the MMX code - is it threadsafe? I seem to 
vaguely remember hearing about some problems with it, and e.g. the libpng 
docs say something similar. I cannot find anything relevant using Google 
though.

 BTW: This code below changes the img argument:
QImage MImageEffect::smoothScale(QImage &img, int dw, int dh)
{
    if(img.depth() < 32)
        img = img.convertDepth(32);

 BTW #2: The ~600K tarball would be much smaller if you included only the 
sources + Makefile.am in the sources directory, Makefile.am.in and 
configure.in.in in the toplevel directory, and told everybody to add admin/ 
there and run "make -f Makefile.cvs" .

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/


More information about the Kde-graphics-devel mailing list