Pixel access

Boudewijn Rempt boud at valdyas.org
Mon Sep 27 17:49:02 CEST 2004


On Monday 27 September 2004 17:23, Michael Thaler wrote:
> Hi,
>
> scaling gives good results, but the scaling code is really slow. The
> problem is, that the code accesses pixels using readpixel(x,y,x,y,pixel).
> This is probably the slowest way to access pixels. I think basically it
> would be the best idea to read a whole line from an image at a time. This
> could be done by calling readpixel (0,y,width(),y,line). But is this the
> most efficient way or is it better to use iterators. If yes, how can I use
> the iterators to read a whole line?

Iterators _should_ be faster, but readpixel isn't the slowest. That's 
getpixel/pixel in kis_paint_device. Cyrille should be able to help you with 
the iterators, I must confess that I don't feel confident using them at the 
moment myself.

-- 
Boudewijn Rempt | "Geef mij maar zuurtjes."
http://www.valdyas.org/fading/index.cgi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20040927/6379c7a5/attachment.pgp


More information about the kimageshop mailing list