Hi,
I need to create a bglbitmap using pixels color info, and for a BGRABitmap I used to do like this:
var
../..
p: PBGRAPixel;
begin
…/…
abgra:=tbgrabitmap.create(voxdimx,voxdimy,ColorToBGRA(ColorToRGB(clblack)));
p := abgra.Data;
j:=0;
while j<voxdimy do begin
k:=0;
while k<voxdimx do begin
p^.red:=imgbuffer8[voxdimy-j-1,k,0];
p^.green:=imgbuffer8[voxdimy-j-1,k,1];
p^.blue:=imgbuffer8[voxdimy-j-1,k,2];
inc(p);
inc(k);
end; //k
inc(j);
end; //j
Is there a way to do the same using a BGLBitmap ? I can not find a "PBGRAPixel" like for BGLBitmap….
I also assign the resulting abgra to a bglbitmap, but I think it's quite slow and may be speeded up.
Thanks a lot.