Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, September 1998
Re: QImage::smoothScale problem


Message 1 in thread

"Hubert W. Schreier" wrote:
> QImage i = image.copy(x, y, s, s); 
> QImage scaled = i.smoothScale(200, 200);
>
>For some values of s, scaling messes up the image completely. 25 does
>not work, 24 does, 27 does not.

The bug is in QImage::copy().  Fixed in Qt 1.41beta - please test it out.

>Furthermore, scaling is not really smooth. In the documentation, I could not
>find what the smooth refers to. Does this function use some smoothing filter
>to avoid aliasing when downscaling, or is it meant to produce a smooth, i.e.
>not pixelated image when upscaling?

It the standard pixel sub-sampling algorithm.

>Are there any other QImage/QPixmap functions for scaling, and what
>interpolation methods do they use?

QPixmap::xForm() - but it uses no interpolation.

--
 [ signature omitted ]