File Format Extensions
File Format Extensions
These extensions allow Imaging to load and save images from/to
files in various formats.
File formats included in Imaging core (that is in
Source directory) must satisfy these requirements:
both loading and saving support, native crossplatform
Object Pascal implementation, support as many data formats as possible,
be stream safe (you have multiple images in one stream and you load them
one by one without exactly knowing where they start - after loading one
stream position must be precisely at the beginning of another - some
file formats (e.g. Daggerfall images) need to know exact file size during loading so
they are inherently unsafe).
File format loaders/savers that do not meet these requirements are
located in Extras package (Extras\Extensions directory).
Some complex file formats make compiled binaries significantly larger.
Most notably JPEG (around 100 KiB), JPEG2000 (around 150 KiB), and PNG
(around 50 KiB). Some formats use others internally - MNG and JNG use
PNG and JPEG. If you know you won't be needing some of those formats
and you don't want large binaries you can disable them at compile stage.
This is done by defining/undefining LINK_*
symbols in ImagingOptions.inc include file
located in Source directory.
All core file formats have corresponding symbols here and all
are defined/enabled by default in this include file.
There is also LINK_EXTRAS symbol that controls
automatic linking with file formats declared in Extras package
(individual file formats can be turned on/off in [ImagingExtras.pas]
unit located in Extras\Extensions directory).
More on supported file formats
Supported File Formats