Why does this Seg fault here
>>>>bgrareplace(bmp,newimage);
Here is the code
Am I using bgrareplace correctly?
bmp := TBGRABitmap.Create;
bmp.LoadFromfile(imageselected.Text);
try
newimage := TBGRABitmap.Create(screen.Width, screen.Height, BGRABlack);
newimage.PutImage(0, 0, bmp, dmDrawWithTransparency);
bgrareplace(bmp,newimage);
finally
newimage.free;
end;
bmp.SaveToFile(filepath + 'wallpaper.bmp');
bmp.free;