ImageEnView.EnableAlphaChannel := True;
{ Make 32-bit }
ImageEnView.IO.Params.BitsPerSample := 8;
ImageEnView.IO.Params.SamplesPerPixel := 4;
{Get the colors in each corner}
iColor := TRGB2TColor(ImageEnView.IEitmap.Pixels[0,0);// top left
iColor := TRGB2TColor(ImageEnView.IEitmap.Pixels[0,iImageHeight - 1);// bottom left
iColor := TRGB2TColor(ImageEnView.IEitmap.Pixels[iImageWidth-1,0);// top right
iColor := TRGB2TColor(ImageEnView.IEitmap.Pixels[iImageWidth-1,iImageHeight - 1);// bottom right
{ Set transparent color baised on the color in the bottom left }
ImageEnView.Proc.SetTransparentColors(ImageEnView.IEBitmap.Pixels[0,
iImageHeight - 1], ImageEnView.IEBitmap.Pixels[0,
iImageHeight - 1], 0);
This is untested or "off the top of my head".
William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html