Skip to content

Codrax/Delphi-Extended-Images-Format

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Delphi-Extended-Images-Format

Support in Delphi for WebP and Heif image codecs with a wrapper for the DLLs.

These units add two new TGraphic class types called THeifImage and TWebPImage respectively. They work as any other TGraphic with support for editing images, assigning to other image types and you can edit the pixels individually by any of the avalabile channels with the TRGBAPixel helper provided in Cod.Imaging.Utils.

Examples

  var Image: THeifImage;
  Image := THeifImage.Create;
  try
    Image.LoadFromFile('sample.heic');

    Image1.Stretch := true;
    Image1.Picture.Graphic := Image;
  finally
    Image.Free;
  end;
  var Image: TWebPImage;
  Image := TWebPImage.Create;
  try
    Image.LoadFromFile('sample.webp');

    Image1.Stretch := true;
    Image1.Picture.Graphic := Image;
  finally
    Image.Free;
  end;

Cross conversion example

  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;

Image

image

About

Support in Delphi for WebP and Heif image codecs with a wrapper for the DLLs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages