Re: Image resampling [PATCH 0/6]

Krzysztof Kosiński <[email protected]>
Newsgroups gmane.comp.graphics.pixman,gmane.comp.lib.cairo
Message-ID <CAFLw2WQRrs_PFyLirAm30Dv__dRgHu7P2HyOhpd_9Q+Bs+QFWg@mail.gmail.com>
2012/11/27 Bill Spitzak <[email protected]>:
> Cairo may want to pre-scale the source surface by an integer factor using a
> box filter so that the sampling filters are not so large. It would then have
> to keep this scaled image around until either the source image is dirtied or
> a transform requiring a different scale is used. I would think this could
> speed up repeated drawing of a much-scaled-down image considerably. It does
> seem to me that such a step should be done by cairo rather than pixman. The
> alternative is for client programs to do this with extra Cairo surfaces for
> the scaled images, but that seems to not be keeping with the easy-to-use api
> intentions of Cairo.

Why not go a little further and implement mipmaps? This would
dramatically speed up the case where an image is repeatedly drawn with
very different transformations, e.g. as is the case when transforming
a bitmap in Inkscape. I guess this would need some support from
Pixman, however.

Regards, Krzysztof
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.