Closed basicbh closed 2 months ago
var WebImage: TWebPImage; var HeifImage: THeifImage; WebImage := TWebPImage.Create; HeifImage := THeifImage.Create; try // Load WebP WebImage.LoadFromFile('sample.webp');
// Assign to Heif HeifImage.Assign(WebImage); // Display Image1.Stretch := true; Image1.Picture.Graphic := HeifImage; // Save heif HeifImage.SaveToFile('out.heif');
finally WebImage.Free; HeifImage.Free; end;
Yes It can.
The only current limitation is saving a THeifImage to a TStream, the SaveToStream() procedure. It's a technical limitation I was unable to implement yet, but It does not affect your use case.
SaveToStream()
var WebImage: TWebPImage; var HeifImage: THeifImage; WebImage := TWebPImage.Create; HeifImage := THeifImage.Create; try // Load WebP WebImage.LoadFromFile('sample.webp');
finally WebImage.Free; HeifImage.Free; end;