LoadFromIntfImage - don't work? lazarus / 39-Graphics ---------------------------------------------------------------------- konung · 2012-12-24 00:06 I do the following: Code: [Select]... graphtype, intfgraphics, lazcanvas, fpImage;  ... var   AImage : TLazIntfImage;   lRawImage: TRawImage;   i,j:integer; begin lRawImage.Init;   lRawImage.Description.Init_BPP32_A8R8G8B8_BIO_TTB(100, 100);   lRawImage.CreateData(true);   AImage := TLazIntfImage.Create(0, 0);   AImage.SetRawImage(lRawImage);   for i:=0 to AImage.Width-1 do     for j:=0 to AImage.Height-1 do       AImage.Colors[i,j]:=FPColor(200, 0, 0, 255);   Image1.Picture.Bitmap.LoadFromIntfImage(AImage); ... but Image1 is black. what wrong? winXP 32 bit, Lazarus 1.0.2 ---------------------------------------------------------------------- taazz · 2012-12-24 02:07 Depending on the widget set you are using the alpha value is backwards reversed. Windows and QT use the same values for opaque and transparent (if I remember correctly 0 = transparent 255 opaque) gtk works the other way around (255 transparent 0 opaque) I'm not sure about the actual value so you need to test it for your self. At least that was my problem a few months back when I was porting a color component suit. ---------------------------------------------------------------------- User137 · 2012-12-24 06:36 You are trying to load it into bitmap (special BMP format). Can you do something like either of these? Code: [Select]Image1.Picture.LoadFromIntfImage(AImage); Image1.Picture.Assign(AImage); ---------------------------------------------------------------------- konung · 2012-12-24 10:07 Quote from: taazz on December 24, 2012, 03:07:43 am... alpha value ... I try different vlaues for Alpha. Result is same. Quote from: User137 on December 24, 2012, 07:36:33 amYou are trying to load it into bitmap (special BMP format). Yeah. 'couse it's manual example: http://wiki.lazarus.freepascal.org/Developing_with_Graphics#Working_wi th_TLazIntfImage.2C_TRawImage_and_TLazCanvas Topic: "Working with TLazIntfImage, TRawImage and TLazCanvas" and "Loading a TLazIntfImage into a TImage". Quote from: User137 on December 24, 2012, 07:36:33 amCan you do something like either of these? No. First - impossible. Second - the same result. Does some one try the same code? Or it's unusable feature? May be there is some another way? I need to do some manipulation with image. And then - show them in some TImage. As i understand - there isn't fast access to pixels in bitmap. And I mast use the way, that I write above. In win7 64 bit - the same. in Linux (ubuntu 64 bit, lazarus 1.0) - nothing (blackbox is'n too)... ---------------------------------------------------------------------- konung · 2012-12-24 13:44 hum... problem solved. I miss that R G B A is World type...  however there is one more problem. if i fill by pixel image with 32-bit mode - it does not work correct. it use image like 24-bit. but it's another problem. ---------------------------------------------------------------------- User137 · 2012-12-24 23:34 Like i said, you are loading image to bitmap. BMP does not support alpha channel.