High-level pixel access methods

Boudewijn Rempt boud at valdyas.org
Sat Feb 14 21:33:27 CET 2004


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...

-- 
Boudewijn Rempt | http://www.valdyas.org/fading/index.cgi


More information about the kimageshop mailing list