Mipmapping for canvas. Ideas and comments.

C. Boemann cbo at boemann.dk
Tue Jul 21 21:50:28 CEST 2009

On Tuesday 21 July 2009 21:13:53 Dmitry Kazakov wrote:
> >> 3) KisPresceledProjection::Private::prescaledQImage vs
> >>   KisPresceledProjection::Private::prescaledQPixmap?
> >> What is the difference and where are they mostly used?
> >
> > Pixmaps reside on the xserver and are fast to paint over and over again
> > Images reside on the client and are good if you need to poke at the
> > pixels or change it every time you display it
> >
> > An image will be converted to a pixmap internally before being drawn on
> > your screen, and this conversion is usually quite expensive.
> Does it mean that if we draw onto pixmap directly, the system will
> work faster? And what are the looses of this approach?
That really depends on what kind of painting you are doing, because some 
operations, will convert the pixmap to image first and then back, making it 
much slower.

> > As to the levels and scaleX/scaleY. I think that the pyramid should just
> > scale with a factor of 2 (in both x and y) for each step. You should then
> > take the closest image and apply the scaleX/scaleY.
> It's good idea, but i thought to store nearest zoomlevels that we got
> from ~KoZoomController to eliminate scaling during requests at all. Is
> it possible? And which scaling algos are better to use in such a case?
> Do you know some books/articles to read about it?
I don't think you should scale to these non factor of 2 levels. it will 
degrade the image more and be slower.

just search the internet.

More information about the kimageshop mailing list