mirror of
https://github.com/Codrax/Delphi-Extended-Images-Format.git
synced 2026-09-29 15:18:11 +03:00
Support in Delphi for WebP and Heif image codecs with a wrapper for the DLLs.
- Pascal 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
- 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 |
||
| bin | ||
| samples | ||
| source | ||
| LICENSE | ||
| README.md | ||
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;