ImageEn, unit imageenview

TImageEnView.RemoveAlphaChannel

TImageEnView.RemoveAlphaChannel


Declaration

procedure RemoveAlphaChannel(Merge: Boolean=false);


Description

Removes the alpha channel and its allocated memory. HasAlphaChannel will be set to false.
If Merge is true the image will be merged with the background color using its alpha channel.


Example

// remove alpha channel from a gif
ImageEnView.io.LoadFromFile('C:\test.gif');
ImageEnView.RemoveAlphaChannel;

// this add a shadow (that uses the alpha channel) then save it to a jpeg (that cannot support alpha channel)
ImageEnView.Proc.AddSoftShadow(4, 3, 3);
ImageEnView.RemoveAlphaChannel( True );  // merge the alpha channel
ImageEnView.IO.SaveToFile('C:\output.jpg');