I often have problems when trying to save an image as a 32-bit bitmap with transparency. Here is what I am trying, but when the image is opened after saving it, it is not transparent with imageen or with other applications:
if SavePictureDialog1.Execute then
begin
Screen.Cursor := crHourGlass;
try
iFilename := SavePictureDialog1.FileName;
ImageEnView1.IO.Params.BMP_HandleTransparency := True;
ImageEnView1.IO.Params.BitsPerSample := 8;
ImageEnView1.IO.Params.SamplesPerPixel := 4;
iRGB := ImageEnView1.IEBitmap.Pixels[0,
ImageEnView1.IEBitmap.Height - 1];
ImageEnView1.Proc.SetTransparentColors(iRGB, iRGB, 0);
ImageEnView1.Update;
iExtension := ExtractFileExt(iFilename);
iIOFileType := IEExtToFileFormat(iExtension);
ImageEnView1.IO.Params.FileType := iIOFileType;
if iIOFileType <> ioICO then
begin
ImageEnView1.IO.PreviewsParams := [ioppDefaultLockPreview];
if ImageEnView1.IO.DoPreviews([ppAuto]) then
ImageEnView1.IO.SaveToFile(iFilename);
end;
finally
Screen.Cursor := crDefault;
end;
end;
Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development