Support in Delphi for WebP and Heif image codecs with a wrapper for the DLLs.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Codrut f6bc6933d4 Better image support and fixes
- Fixed THeifImage not having proper pixel readers
- Fixed WebP images unable to have 24bit images assigned
- Fixed Heif images unable to have 32bit images assigned
- Added channel support for WebP images
- Added lossless support for WebP images
- WebP container can now also load almost all color space types (only 2 can be displayed in Delphi or assigned to other images)
- Improved TRBGAPixel class helper
2025-03-06 19:20:55 +02:00
bin Added required DLLs 2024-09-12 07:08:15 +03:00
samples Added samples 2024-06-18 12:27:55 +03:00
source Better image support and fixes 2025-03-06 19:20:55 +02:00
LICENSE Initial commit 2024-06-18 12:20:26 +03:00
README.md Update README.md 2024-09-12 07:09:38 +03:00

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