ExtFileFormats.xml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <?xml-stylesheet type="text/xsl" href="../Xsl/doc2html.xsl"?>
  3. <doc>
  4. <title>File Format Extensions</title>
  5. <chapter>
  6. <title>File Format Extensions</title>
  7. <par>
  8. These extensions allow Imaging to load and save images from/to
  9. files in various formats.
  10. File formats included in Imaging core (that is in
  11. <keyword>Source</keyword> directory) must satisfy these requirements:
  12. both loading and saving support, native crossplatform
  13. Object Pascal implementation, support as many data formats as possible,
  14. be stream safe (you have multiple images in one stream and you load them
  15. one by one without exactly knowing where they start - after loading one
  16. stream position must be precisely at the beginning of another - some
  17. file formats (e.g. Daggerfall images) need to know exact file size during loading so
  18. they are inherently unsafe).
  19. File format loaders/savers that do not meet these requirements are
  20. located in Extras package (<keyword>Extras\Extensions</keyword> directory).
  21. </par>
  22. <par>
  23. Some complex file formats make compiled binaries significantly larger.
  24. Most notably <b>JPEG</b> (around 100 KiB), <b>JPEG2000</b> (around 150 KiB), and <b>PNG</b>
  25. (around 50 KiB). Some formats use others internally - <b>MNG</b> and <b>JNG</b> use
  26. PNG and JPEG. If you know you won't be needing some of those formats
  27. and you don't want large binaries you can disable them at compile stage.
  28. This is done by defining/undefining <icode>LINK_*</icode>
  29. symbols in <icode>ImagingOptions.inc</icode> include file
  30. located in <keyword>Source</keyword> directory.
  31. All core file formats have corresponding symbols here and all
  32. are defined/enabled by default in this include file.
  33. There is also <icode>LINK_EXTRAS</icode> symbol that controls
  34. automatic linking with file formats declared in Extras package
  35. (individual file formats can be turned on/off in <ref>ImagingExtras.pas</ref>
  36. unit located in <keyword>Extras\Extensions</keyword> directory).
  37. </par>
  38. <linklist>
  39. <title>More on supported file formats</title>
  40. <lslink url="../FileFormats/FileFormats.xml">Supported File Formats</lslink>
  41. </linklist>
  42. </chapter>
  43. </doc>