conversion.h 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. /* conversion.h
  2. *
  3. * 20/9/09
  4. * - from proto.h
  5. */
  6. /*
  7. This file is part of VIPS.
  8. VIPS is free software; you can redistribute it and/or modify
  9. it under the terms of the GNU Lesser General Public License as published by
  10. the Free Software Foundation; either version 2 of the License, or
  11. (at your option) any later version.
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. GNU Lesser General Public License for more details.
  16. You should have received a copy of the GNU Lesser General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  19. 02110-1301 USA
  20. */
  21. /*
  22. These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
  23. */
  24. #ifndef VIPS_CONVERSION_H
  25. #define VIPS_CONVERSION_H
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif /*__cplusplus*/
  29. typedef enum {
  30. VIPS_EXTEND_BLACK,
  31. VIPS_EXTEND_COPY,
  32. VIPS_EXTEND_REPEAT,
  33. VIPS_EXTEND_MIRROR,
  34. VIPS_EXTEND_WHITE,
  35. VIPS_EXTEND_BACKGROUND,
  36. VIPS_EXTEND_LAST
  37. } VipsExtend;
  38. typedef enum {
  39. VIPS_COMPASS_DIRECTION_CENTRE,
  40. VIPS_COMPASS_DIRECTION_NORTH,
  41. VIPS_COMPASS_DIRECTION_EAST,
  42. VIPS_COMPASS_DIRECTION_SOUTH,
  43. VIPS_COMPASS_DIRECTION_WEST,
  44. VIPS_COMPASS_DIRECTION_NORTH_EAST,
  45. VIPS_COMPASS_DIRECTION_SOUTH_EAST,
  46. VIPS_COMPASS_DIRECTION_SOUTH_WEST,
  47. VIPS_COMPASS_DIRECTION_NORTH_WEST,
  48. VIPS_COMPASS_DIRECTION_LAST
  49. } VipsCompassDirection;
  50. typedef enum {
  51. VIPS_DIRECTION_HORIZONTAL,
  52. VIPS_DIRECTION_VERTICAL,
  53. VIPS_DIRECTION_LAST
  54. } VipsDirection;
  55. typedef enum {
  56. VIPS_ALIGN_LOW,
  57. VIPS_ALIGN_CENTRE,
  58. VIPS_ALIGN_HIGH,
  59. VIPS_ALIGN_LAST
  60. } VipsAlign;
  61. typedef enum {
  62. VIPS_ANGLE_D0,
  63. VIPS_ANGLE_D90,
  64. VIPS_ANGLE_D180,
  65. VIPS_ANGLE_D270,
  66. VIPS_ANGLE_LAST
  67. } VipsAngle;
  68. typedef enum {
  69. VIPS_ANGLE45_D0,
  70. VIPS_ANGLE45_D45,
  71. VIPS_ANGLE45_D90,
  72. VIPS_ANGLE45_D135,
  73. VIPS_ANGLE45_D180,
  74. VIPS_ANGLE45_D225,
  75. VIPS_ANGLE45_D270,
  76. VIPS_ANGLE45_D315,
  77. VIPS_ANGLE45_LAST
  78. } VipsAngle45;
  79. typedef enum {
  80. VIPS_INTERESTING_NONE,
  81. VIPS_INTERESTING_CENTRE,
  82. VIPS_INTERESTING_ENTROPY,
  83. VIPS_INTERESTING_ATTENTION,
  84. VIPS_INTERESTING_LOW,
  85. VIPS_INTERESTING_HIGH,
  86. VIPS_INTERESTING_LAST
  87. } VipsInteresting;
  88. typedef enum {
  89. VIPS_BLEND_MODE_CLEAR,
  90. VIPS_BLEND_MODE_SOURCE,
  91. VIPS_BLEND_MODE_OVER,
  92. VIPS_BLEND_MODE_IN,
  93. VIPS_BLEND_MODE_OUT,
  94. VIPS_BLEND_MODE_ATOP,
  95. VIPS_BLEND_MODE_DEST,
  96. VIPS_BLEND_MODE_DEST_OVER,
  97. VIPS_BLEND_MODE_DEST_IN,
  98. VIPS_BLEND_MODE_DEST_OUT,
  99. VIPS_BLEND_MODE_DEST_ATOP,
  100. VIPS_BLEND_MODE_XOR,
  101. VIPS_BLEND_MODE_ADD,
  102. VIPS_BLEND_MODE_SATURATE,
  103. VIPS_BLEND_MODE_MULTIPLY,
  104. VIPS_BLEND_MODE_SCREEN,
  105. VIPS_BLEND_MODE_OVERLAY,
  106. VIPS_BLEND_MODE_DARKEN,
  107. VIPS_BLEND_MODE_LIGHTEN,
  108. VIPS_BLEND_MODE_COLOUR_DODGE,
  109. VIPS_BLEND_MODE_COLOUR_BURN,
  110. VIPS_BLEND_MODE_HARD_LIGHT,
  111. VIPS_BLEND_MODE_SOFT_LIGHT,
  112. VIPS_BLEND_MODE_DIFFERENCE,
  113. VIPS_BLEND_MODE_EXCLUSION,
  114. VIPS_BLEND_MODE_LAST
  115. } VipsBlendMode;
  116. int vips_copy( VipsImage *in, VipsImage **out, ... )
  117. __attribute__((sentinel));
  118. int vips_tilecache( VipsImage *in, VipsImage **out, ... )
  119. __attribute__((sentinel));
  120. int vips_linecache( VipsImage *in, VipsImage **out, ... )
  121. __attribute__((sentinel));
  122. int vips_sequential( VipsImage *in, VipsImage **out, ... )
  123. __attribute__((sentinel));
  124. int vips_cache( VipsImage *in, VipsImage **out, ... )
  125. __attribute__((sentinel));
  126. int vips_copy_file( VipsImage *in, VipsImage **out, ... )
  127. __attribute__((sentinel));
  128. int vips_embed( VipsImage *in, VipsImage **out,
  129. int x, int y, int width, int height, ... )
  130. __attribute__((sentinel));
  131. int vips_gravity( VipsImage *in, VipsImage **out,
  132. VipsCompassDirection direction, int width, int height, ... )
  133. __attribute__((sentinel));
  134. int vips_flip( VipsImage *in, VipsImage **out, VipsDirection direction, ... )
  135. __attribute__((sentinel));
  136. int vips_insert( VipsImage *main, VipsImage *sub, VipsImage **out,
  137. int x, int y, ... )
  138. __attribute__((sentinel));
  139. int vips_join( VipsImage *in1, VipsImage *in2, VipsImage **out,
  140. VipsDirection direction, ... )
  141. __attribute__((sentinel));
  142. int vips_arrayjoin( VipsImage **in, VipsImage **out, int n, ... )
  143. __attribute__((sentinel));
  144. int vips_extract_area( VipsImage *in, VipsImage **out,
  145. int left, int top, int width, int height, ... )
  146. __attribute__((sentinel));
  147. int vips_crop( VipsImage *in, VipsImage **out,
  148. int left, int top, int width, int height, ... )
  149. __attribute__((sentinel));
  150. int vips_smartcrop( VipsImage *in, VipsImage **out, int width, int height, ... )
  151. __attribute__((sentinel));
  152. int vips_extract_band( VipsImage *in, VipsImage **out, int band, ... )
  153. __attribute__((sentinel));
  154. int vips_replicate( VipsImage *in, VipsImage **out, int across, int down, ... )
  155. __attribute__((sentinel));
  156. int vips_grid( VipsImage *in, VipsImage **out,
  157. int tile_height, int across, int down, ... )
  158. __attribute__((sentinel));
  159. int vips_transpose3d( VipsImage *in, VipsImage **out, ... )
  160. __attribute__((sentinel));
  161. int vips_wrap( VipsImage *in, VipsImage **out, ... )
  162. __attribute__((sentinel));
  163. int vips_rot( VipsImage *in, VipsImage **out, VipsAngle angle, ... )
  164. __attribute__((sentinel));
  165. int vips_rot90( VipsImage *in, VipsImage **out, ... )
  166. __attribute__((sentinel));
  167. int vips_rot180( VipsImage *in, VipsImage **out, ... )
  168. __attribute__((sentinel));
  169. int vips_rot270( VipsImage *in, VipsImage **out, ... )
  170. __attribute__((sentinel));
  171. int vips_rot45( VipsImage *in, VipsImage **out, ... )
  172. __attribute__((sentinel));
  173. VipsAngle vips_autorot_get_angle( VipsImage *image );
  174. void vips_autorot_remove_angle( VipsImage *image );
  175. int vips_autorot( VipsImage *in, VipsImage **out, ... )
  176. __attribute__((sentinel));
  177. int vips_zoom( VipsImage *in, VipsImage **out, int xfac, int yfac, ... )
  178. __attribute__((sentinel));
  179. int vips_subsample( VipsImage *in, VipsImage **out, int xfac, int yfac, ... )
  180. __attribute__((sentinel));
  181. int vips_cast( VipsImage *in, VipsImage **out, VipsBandFormat format, ... )
  182. __attribute__((sentinel));
  183. int vips_cast_uchar( VipsImage *in, VipsImage **out, ... )
  184. __attribute__((sentinel));
  185. int vips_cast_char( VipsImage *in, VipsImage **out, ... )
  186. __attribute__((sentinel));
  187. int vips_cast_ushort( VipsImage *in, VipsImage **out, ... )
  188. __attribute__((sentinel));
  189. int vips_cast_short( VipsImage *in, VipsImage **out, ... )
  190. __attribute__((sentinel));
  191. int vips_cast_uint( VipsImage *in, VipsImage **out, ... )
  192. __attribute__((sentinel));
  193. int vips_cast_int( VipsImage *in, VipsImage **out, ... )
  194. __attribute__((sentinel));
  195. int vips_cast_float( VipsImage *in, VipsImage **out, ... )
  196. __attribute__((sentinel));
  197. int vips_cast_double( VipsImage *in, VipsImage **out, ... )
  198. __attribute__((sentinel));
  199. int vips_cast_complex( VipsImage *in, VipsImage **out, ... )
  200. __attribute__((sentinel));
  201. int vips_cast_dpcomplex( VipsImage *in, VipsImage **out, ... )
  202. __attribute__((sentinel));
  203. int vips_scale( VipsImage *in, VipsImage **out, ... )
  204. __attribute__((sentinel));
  205. int vips_msb( VipsImage *in, VipsImage **out, ... )
  206. __attribute__((sentinel));
  207. int vips_byteswap( VipsImage *in, VipsImage **out, ... )
  208. __attribute__((sentinel));
  209. int vips_bandjoin( VipsImage **in, VipsImage **out, int n, ... )
  210. __attribute__((sentinel));
  211. int vips_bandjoin2( VipsImage *in1, VipsImage *in2, VipsImage **out, ... )
  212. __attribute__((sentinel));
  213. int vips_bandjoin_const( VipsImage *in, VipsImage **out, double *c, int n, ... )
  214. __attribute__((sentinel));
  215. int vips_bandjoin_const1( VipsImage *in, VipsImage **out, double c, ... )
  216. __attribute__((sentinel));
  217. int vips_bandrank( VipsImage **in, VipsImage **out, int n, ... )
  218. __attribute__((sentinel));
  219. int vips_bandfold( VipsImage *in, VipsImage **out, ... )
  220. __attribute__((sentinel));
  221. int vips_bandunfold( VipsImage *in, VipsImage **out, ... )
  222. __attribute__((sentinel));
  223. int vips_bandbool( VipsImage *in, VipsImage **out,
  224. VipsOperationBoolean boolean, ... )
  225. __attribute__((sentinel));
  226. int vips_bandand( VipsImage *in, VipsImage **out, ... )
  227. __attribute__((sentinel));
  228. int vips_bandor( VipsImage *in, VipsImage **out, ... )
  229. __attribute__((sentinel));
  230. int vips_bandeor( VipsImage *in, VipsImage **out, ... )
  231. __attribute__((sentinel));
  232. int vips_bandmean( VipsImage *in, VipsImage **out, ... )
  233. __attribute__((sentinel));
  234. int vips_recomb( VipsImage *in, VipsImage **out, VipsImage *m, ... )
  235. __attribute__((sentinel));
  236. int vips_ifthenelse( VipsImage *cond, VipsImage *in1, VipsImage *in2,
  237. VipsImage **out, ... )
  238. __attribute__((sentinel));
  239. int vips_switch( VipsImage **tests, VipsImage **out, int n, ... )
  240. __attribute__((sentinel));
  241. int vips_flatten( VipsImage *in, VipsImage **out, ... )
  242. __attribute__((sentinel));
  243. int vips_addalpha( VipsImage *in, VipsImage **out, ... )
  244. __attribute__((sentinel));
  245. int vips_premultiply( VipsImage *in, VipsImage **out, ... )
  246. __attribute__((sentinel));
  247. int vips_unpremultiply( VipsImage *in, VipsImage **out, ... )
  248. __attribute__((sentinel));
  249. int vips_composite( VipsImage **in, VipsImage **out, int n, int *mode, ... )
  250. __attribute__((sentinel));
  251. int vips_composite2( VipsImage *base, VipsImage *overlay, VipsImage **out,
  252. VipsBlendMode mode1, ... )
  253. __attribute__((sentinel));
  254. int vips_falsecolour( VipsImage *in, VipsImage **out, ... )
  255. __attribute__((sentinel));
  256. int vips_gamma( VipsImage *in, VipsImage **out, ... )
  257. __attribute__((sentinel));
  258. #ifdef __cplusplus
  259. }
  260. #endif /*__cplusplus*/
  261. #endif /*VIPS_CONVERSION_H*/