Vampyre Imaging Library Forum

Imaging Category => Help & Questions => Topic started by: hanoglu on 20 December 2012, 15:58:25

Title: What is wrong with saving transparent PNG to JPEG
Post by: hanoglu on 20 December 2012, 15:58:25
What is wrong with saving transparent PNG to JPEG. There is two images atteched, you will see the problem.

var
  FImage: TMultiImage;
begin
  FImage: TMultiImage.Create;
  FImage.LoadMultiFromFile('c:\2.png');
  FImage.ActiveImage := 0;
  FImage.SaveToFile('c:\a.jpeg);
  FImage.Free;
end;
Title: Re: What is wrong with saving transparent PNG to JPEG
Post by: Galfar on 22 December 2012, 03:52:07
JPEG file format does not support transparency, it's just not stored in the file.
If you want JPEG with transparency try saving it as JNG file format
(but only a handful of programs can read these).