I need to load the data of bitmap files into a buffer in the RGBA
format, but i'm somewhat lost.
Reading the wiki and the source i got to the following code:
procedure DumpMem(Data: PCardinal; Size: Integer);
var
i: Integer;
Color: TRGBA;
begin
for i := 0 to Size - 1 do
begin
Color := TR
You could try using TLazIntfImage.GetDataLineStart() instead.
I think you can modify your code this way:
...
for y := 0 to IntfImg.DataDescription.Height-1 do
DumpMem(PCardinal(IntfImg.GetDataLineStart(y)), IntfImg.DataDescription.Width);
...
Regards!
-Marco
2008/1/24, Luiz Americo Pereira Cam
Your image is in 24 bits, test load and then changing it to 32 bits
--
Laurent.
My Components: http://wiki.lazarus.freepascal.org/Wile64
French Forum : http://lazforum-fr.tuxfamily.org/index.php
Marco Alvarado wrote:
You could try using TLazIntfImage.GetDataLineStart() instead.
I think you can modify your code this way:
...
for y := 0 to IntfImg.DataDescription.Height-1 do
DumpMem(PCardinal(IntfImg.GetDataLineStart(y)), IntfImg.DataDescription.Width);
...
Thanks, but i still get r
wile64 wrote:
Your image is in 24 bits, test load and then changing it to 32 bits
It seems the best description for what i want is
Init_BPP32_B8G8R8_BIO_TTB that gives me a 24bit depth with a 32bits per
pixel, but still getting random values.
Also tested Init_BPP24_B8G8R8_BIO_TTB.
No luck.
Luiz Americo Pereira Camara wrote:
Should i pass the width, height when init datadescription?
This does not help. I hardcoded width and height to 2 and got the same
result.
Luiz
_
To unsubscribe: mail [EMAIL PROTECTED] with
Quoting Luiz Americo Pereira Camara <[EMAIL PROTECTED]>:
I need to load the data of bitmap files into a buffer in the RGBA
format, but i'm somewhat lost.
I made a program to process BMP files. The images were fixed 640x480.
This is an example of how I loaded the images.
const
MaxImgH = 4