Hi
What version of ImageEn are you using? When I use:
ImageEnView1.IO.LoadFromFile( 'D:\camera.png' );
ImageEnView1.IEBitmap.RemoveAlphaChannel( True, clFuchsia );
ImageEnView1.IO.SaveToFile( 'D:\camera.bmp' );
I get the same as the second image, which is what I would expect.
Which is not actually a suitable image because the background color has been merged with the anti-aliasing, so displayed on screen it will look like this:
Unfortunately this problem (going from full alpha to 1bit alpha) is not an easy one to solve (whether with ImageEn or any third party editor). You are always going to be left with ugly "jaggies". The best solution is to merge with a suitable anti-aliasing color (similar to the expected background color of the destination, e.g. light gray) and then set that color to fuchsia.
const
Anti_Aliasing_Color = $00C9C9C9; // Light gray
begin
ImageEnView1.IO.LoadFromFile( 'D:\camera.png' );
// Merge alpha with our background color
ImageEnView1.IEBitmap.RemoveAlphaChannel( True, Anti_Aliasing_Color );
// Convert our background color pixels to fuchsia
ImageEnView1.Proc.CastColorRange( Anti_Aliasing_Color, Anti_Aliasing_Color, clFuchsia );
ImageEnView1.IO.SaveToFile( 'D:\camera2.bmp' );
end;
Nigel
Xequte Software
www.imageen.com