• Welcome to Vampyre Imaging Library Forum. Please login or sign up.
 

What is wrong with saving transparent PNG to JPEG

Started by hanoglu, 20 December 2012, 15:58:25

Previous topic - Next topic

hanoglu

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;

Galfar

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).

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Name:
Email:

Shortcuts: ALT+S save/post or ALT+P preview

SMF spam blocked by CleanTalk