Codrax / Delphi-Extended-Images-Format

Support in Delphi for WebP and Heif image codecs with a wrapper for the DLLs.
MIT License
9 stars 4 forks source link

HI,Can this convert webp heic to jpg or png? #1

Closed basicbh closed 2 weeks ago

basicbh commented 2 weeks 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;

Codrax commented 2 weeks ago

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.