High-level pixel access methods
Patrick Julien
freak at codepimps.org
Sun Feb 15 10:18:20 CET 2004
On February 14, 2004 03:33 pm, Boudewijn Rempt wrote:
> On Saturday 14 February 2004 21:28, Boudewijn Rempt wrote:
>
> <...>
>
> Of course, being still a bit under the weather I only now remembered that
> KisPixelData is a pointer to a whole lot of pixels, not a single pixel. A
> real data structure for a single pixel might be useful, I think.
>
> Something like:
>
> struct KisPixel : public KShared {
> KisPixel();
> virtual ~KisPixel();
> Q_UINT8 size // Length in bytes of the data in this pixel
> QUANTUM *data; // Pointer to the pixeldata -- just a plain sequence of
> // bytes
> };
>
> One extra byte for size wouldn't hurt too much, I hope...
Well, if we we're to go with the iterator idea, setting up strutures like
these would be costly.
Not only, but for a same image, size would always be the same for each pixel.
More information about the kimageshop
mailing list