Repo for the search and displace ingest module that takes odf, docx and pdf and transforms it into .md to be used with search and displace operations
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

148 lines
5.7 KiB

3 years ago
  1. {
  2. Vampyre Imaging Library
  3. by Marek Mauder
  4. http://imaginglib.sourceforge.net
  5. The contents of this file are used with permission, subject to the Mozilla
  6. Public License Version 1.1 (the "License"); you may not use this file except
  7. in compliance with the License. You may obtain a copy of the License at
  8. http://www.mozilla.org/MPL/MPL-1.1.html
  9. Software distributed under the License is distributed on an "AS IS" basis,
  10. WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
  11. the specific language governing rights and limitations under the License.
  12. Alternatively, the contents of this file may be used under the terms of the
  13. GNU Lesser General Public License (the "LGPL License"), in which case the
  14. provisions of the LGPL License are applicable instead of those above.
  15. If you wish to allow use of your version of this file only under the terms
  16. of the LGPL License and not to allow others to use your version of this file
  17. under the MPL, indicate your decision by deleting the provisions above and
  18. replace them with the notice and other provisions required by the LGPL
  19. License. If you do not delete the provisions above, a recipient may use
  20. your version of this file under either the MPL or the LGPL License.
  21. For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html
  22. }
  23. { This is helper unit that registers all image file formats in Extras package
  24. to Imaging core loading and saving functions. Just put this unit in your uses
  25. clause instead of adding every unit that provides new file format support.
  26. Also new constants for SetOption/GetOption functions for new file formats
  27. are located here.}
  28. unit ImagingExtras;
  29. {$I ImagingOptions.inc}
  30. {$DEFINE DONT_LINK_JPEG2000} // link support for JPEG2000 images
  31. //{$DEFINE DONT_LINK_TIFF} // link support for TIFF images
  32. //{$DEFINE DONT_LINK_PSD} // link support for PSD images
  33. {$DEFINE DONT_LINK_PCX} // link support for PCX images
  34. {$DEFINE DONT_LINK_XPM} // link support for XPM images
  35. {$IFNDEF FULL_FEATURE_SET}
  36. {$DEFINE DONT_LINK_ELDER} // link support for Elder Imagery images
  37. {$ENDIF}
  38. {$IF not (
  39. (Defined(DCC) and Defined(CPUX86) and not Defined(MACOS)) or
  40. (Defined(FPC) and not Defined(MSDOS) and
  41. ((Defined(CPUX86) and (Defined(LINUX) or Defined(WIN32) or Defined(MACOS)) or
  42. (Defined(CPUX64) and Defined(LINUX)))))
  43. )}
  44. // JPEG2000 only for 32bit Windows/Linux/OSX and for 64bit Unix with FPC
  45. {$DEFINE DONT_LINK_JPEG2000}
  46. {$IFEND}
  47. interface
  48. const
  49. { Those are new options for GetOption/SetOption interface. }
  50. { Controls JPEG 2000 lossy compression quality. It is number in range 1..100.
  51. 1 means small/ugly file, 100 means large/nice file. Default is 80.}
  52. ImagingJpeg2000Quality = 55;
  53. { Controls whether JPEG 2000 image is saved with full file headers or just
  54. as code stream. Default value is False (0).}
  55. ImagingJpeg2000CodeStreamOnly = 56;
  56. { Specifies JPEG 2000 image compression type. If True (1), saved JPEG 2000 files
  57. will be losslessly compressed. Otherwise lossy compression is used.
  58. Default value is False (0).}
  59. ImagingJpeg2000LosslessCompression = 57;
  60. { Specifies compression scheme used when saving TIFF images. Supported values
  61. are 0 (Uncompressed), 1 (LZW), 2 (PackBits RLE), 3 (Deflate - ZLib), 4 (JPEG),
  62. 5 (CCITT Group 4 fax encoding - for binary images only).
  63. Default is 1 (LZW). Note that not all images can be stored with
  64. JPEG compression - these images will be saved with default compression if
  65. JPEG is set.}
  66. ImagingTiffCompression = 65;
  67. { Controls compression quality when selected TIFF compression is Jpeg.
  68. It is number in range 1..100. 1 means small/ugly file,
  69. 100 means large/nice file. Accessible trough ImagingTiffJpegQuality option.}
  70. ImagingTiffJpegQuality = 66;
  71. { If enabled image data is saved as layer of PSD file. This is required
  72. to get proper transparency when opened in Photoshop for images with
  73. alpha data (will be opened with one layer, RGB color channels, and transparency).
  74. If you don't need this Photoshop compatibility turn this option off as you'll get
  75. smaller file (will be opened in PS as background raster with RGBA channels).
  76. Default value is True (1). }
  77. ImagingPSDSaveAsLayer = 70;
  78. implementation
  79. uses
  80. {$IFNDEF DONT_LINK_FILE_FORMATS}
  81. {$IFNDEF DONT_LINK_JPEG2000}
  82. ImagingJpeg2000,
  83. {$ENDIF}
  84. {$IFNDEF DONT_LINK_TIFF}
  85. ImagingTiff,
  86. {$ENDIF}
  87. {$IFNDEF DONT_LINK_PSD}
  88. ImagingPsd,
  89. {$ENDIF}
  90. {$IFNDEF DONT_LINK_PCX}
  91. ImagingPcx,
  92. {$ENDIF}
  93. {$IFNDEF DONT_LINK_XPM}
  94. ImagingXpm,
  95. {$ENDIF}
  96. {$IFNDEF DONT_LINK_ELDER}
  97. ElderImagery,
  98. {$ENDIF}
  99. {$ENDIF}
  100. Imaging;
  101. {
  102. File Notes:
  103. -- TODOS -----------------------------------------------------
  104. - nothing now
  105. -- 0.77 -----------------------------------------------------
  106. - ..
  107. -- 0.26.5 Changes/Bug Fixes ---------------------------------
  108. - Added Group 4 Fax encoding as compression for TIFF files.
  109. - Added ImagingTiffJpegQuality option.
  110. -- 0.26.3 Changes/Bug Fixes ---------------------------------
  111. - Allowed JPEG2000 for Mac OS X x86
  112. -- 0.26.1 Changes/Bug Fixes ---------------------------------
  113. - ElderImagery formats are disabled by default, TIFF enabled.
  114. - Changed _LINK_ symbols according to changes in ImagingOptions.inc.
  115. -- 0.24.1 Changes/Bug Fixes ---------------------------------
  116. - Allowed JPEG2000 for x86_64 CPUS in Linux
  117. -- 0.23 Changes/Bug Fixes -----------------------------------
  118. - Better IF conditional to disable JPEG2000 on unsupported platforms.
  119. - Added PSD and TIFF related stuff.
  120. -- 0.21 Changes/Bug Fixes -----------------------------------
  121. - Created with initial stuff.
  122. }
  123. end.