Im new to this lib. I have a bitmap from another source.. I need to use BRGA to downscale it, then display it.. I cant for the life of me get this to work. Im sure Im doing something stupid. Heres a stripped down version.
procedure Resize;
var BRGAbitmap: TBGRABitmap;
var aBitmap : Tbitmap;
begin
aBitmap:=Tbitmap.Create;
aBitmap.SetSize(100, 100);
BRGABitmap := TBGRABitmap.Create(100, 100, BGRAPixelTransparent);
Try
//Bitmap.Bitmap.PixelFormat:= pf24bit;
BRGABitmap.Bitmap.Assign(aBitmap);
BRGABitmap.ResampleFilter:=rfBestQuality;
BRGABitmap.Resample(90, 90, rmFineResample); <<< access violation here..
BRGABitmap.Draw(canvas,0,0); << access violation here
Finally
BRGABitmap.Free;
ABitmap.Free;
End;