[email protected] escreveu:
Hi.
I'am working on Cairo Canvas implementation
and for implementing StretchDraw function I need
to get RasterImage data in format RGB24 or ARGB32.
CAIRO_FORMAT_ARGB32
each pixel is a 32-bit quantity, with alpha in the upper 8 bits, then
red, then green, then blue. The 32-bit quantities are stored
native-endian. Pre-multiplied alpha is used. (That is, 50% transparent
red is 0x80800000, not 0x80ff0000.)
CAIRO_FORMAT_RGB24
each pixel is a 32-bit quantity, with the upper 8 bits unused. Red,
Green, and Blue are stored in the remaining 24 bits in that order.
Can I use TLazIntfImage for this task and how?
AFAIK is not possible. Search for thread "How to load aRGBA data from a
bitmap file using TLazIntfImage" in Lazarus list.
Also read http://forum.lazarus.freepascal.org/index.php/topic,7771.0.html
BTW: in LuiImage implementation you can find how implement StrechDraw
feature in cairo:
http://luipack.googlecode.com/svn/trunk/luicairo/luiimage.pas
There you will find also how to get the appropriate data format for
cairo using imaginglib
Luiz
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus