Luiz Americo Pereira Camara rašė:
I tried that sometime ago without success:
http://thread.gmane.org/gmane.comp.ide.lazarus.general/22010
I studied Your code and found where problem is: DataDescription need
initialize through variable. Working code (seems that TRGBA comes from
GraphicEx.pas,
Marc Weustink rašė:
Valdas Jankūnas wrote:
Marc Weustink rašė:
A faster way, (which might work in most cases) is when you have a 24bit
depth description with a 32bits per pixel image.
How retrieve image description from TBitmap?
IntfImage.DataDescription
Then you can simply add
Valdas Jankūnas wrote:
Hello,
My code loads a PNG image from resource, modifies it, and then paints
on canvas:
var
png: TPortableNetworkGraphic;
img: TLazIntfImage;
bmp: TBitmap;
begin
// load from resource
png:=TPortableNetworkGraphic.Create;
Marc Weustink rašė:
A faster way, (which might work in most cases) is when you have a 24bit
depth description with a 32bits per pixel image.
How retrieve image description from TBitmap?
Then you can simply add
an alpha description (precision=8, shift=24 or 0) to the rawimage.
How i
Valdas Jankūnas wrote:
Marc Weustink rašė:
A faster way, (which might work in most cases) is when you have a 24bit
depth description with a 32bits per pixel image.
How retrieve image description from TBitmap?
IntfImage.DataDescription
Then you can simply add
an alpha description
Valdas Jankūnas wrote:
I found another solution to not use a proxy image, but load resource
from stream directly to LazIntfImage (created with
Init_BPP32_B8G8R8A8_BIO_TTB description). Now i always got alpha channel
and code is flexible to various image types (need just change image
Hello,
My code loads a PNG image from resource, modifies it, and then paints
on canvas:
var
png: TPortableNetworkGraphic;
img: TLazIntfImage;
bmp: TBitmap;
begin
// load from resource
png:=TPortableNetworkGraphic.Create;
png.LoadFromLazarusResource('a_png_image');