vips7compat.h 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240
  1. /* compat with the vips7 API
  2. *
  3. * 4/3/11
  4. * - hacked up
  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_VIPS7COMPAT_H
  25. #define VIPS_VIPS7COMPAT_H
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif /*__cplusplus*/
  29. /* Renamed types.
  30. */
  31. /* We have this misspelt in earlier versions :(
  32. */
  33. #define VIPS_META_IPCT_NAME VIPS_META_IPTC_NAME
  34. #define IM_D93_X0 VIPS_D93_X0
  35. #define IM_D93_Y0 VIPS_D93_Y0
  36. #define IM_D93_Z0 VIPS_D93_Z0
  37. #define IM_D75_X0 VIPS_D75_X0
  38. #define IM_D75_Y0 VIPS_D75_Y0
  39. #define IM_D75_Z0 VIPS_D75_Z0
  40. #define IM_D65_X0 VIPS_D65_X0
  41. #define IM_D65_Y0 VIPS_D65_Y0
  42. #define IM_D65_Z0 VIPS_D65_Z0
  43. #define IM_D55_X0 VIPS_D55_X0
  44. #define IM_D55_Y0 VIPS_D55_Y0
  45. #define IM_D55_Z0 VIPS_D55_Z0
  46. #define IM_D50_X0 VIPS_D50_X0
  47. #define IM_D50_Y0 VIPS_D50_Y0
  48. #define IM_D50_Z0 VIPS_D50_Z0
  49. #define IM_A_X0 VIPS_A_X0
  50. #define IM_A_Y0 VIPS_A_Y0
  51. #define IM_A_Z0 VIPS_A_Z0
  52. #define IM_B_X0 VIPS_B_X0
  53. #define IM_B_Y0 VIPS_B_Y0
  54. #define IM_B_Z0 VIPS_B_Z0
  55. #define IM_C_X0 VIPS_C_X0
  56. #define IM_C_Y0 VIPS_C_Y0
  57. #define IM_C_Z0 VIPS_C_Z0
  58. #define IM_E_X0 VIPS_E_X0
  59. #define IM_E_Y0 VIPS_E_Y0
  60. #define IM_E_Z0 VIPS_E_Z0
  61. #define IM_D3250_X0 VIPS_D3250_X0
  62. #define IM_D3250_Y0 VIPS_D3250_Y0
  63. #define IM_D3250_Z0 VIPS_D3250_Z0
  64. #define im_col_Lab2XYZ vips_col_Lab2XYZ
  65. #define im_col_XYZ2Lab vips_col_XYZ2Lab
  66. #define im_col_ab2h vips_col_ab2h
  67. #define im_col_ab2Ch vips_col_ab2Ch
  68. #define im_col_Ch2ab vips_col_Ch2ab
  69. #define im_col_L2Lucs vips_col_L2Lcmc
  70. #define im_col_C2Cucs vips_col_C2Ccmc
  71. #define im_col_Ch2hucs vips_col_Ch2hcmc
  72. #define im_col_pythagoras vips_pythagoras
  73. #define im_col_make_tables_UCS vips_col_make_tables_CMC
  74. #define im_col_Lucs2L vips_col_Lcmc2L
  75. #define im_col_Cucs2C vips_col_Ccmc2C
  76. #define im_col_Chucs2h vips_col_Chcmc2h
  77. #define PEL VipsPel
  78. #define IM_BANDFMT_NOTSET VIPS_FORMAT_NOTSET
  79. #define IM_BANDFMT_UCHAR VIPS_FORMAT_UCHAR
  80. #define IM_BANDFMT_CHAR VIPS_FORMAT_CHAR
  81. #define IM_BANDFMT_USHORT VIPS_FORMAT_USHORT
  82. #define IM_BANDFMT_SHORT VIPS_FORMAT_SHORT
  83. #define IM_BANDFMT_UINT VIPS_FORMAT_UINT
  84. #define IM_BANDFMT_INT VIPS_FORMAT_INT
  85. #define IM_BANDFMT_FLOAT VIPS_FORMAT_FLOAT
  86. #define IM_BANDFMT_COMPLEX VIPS_FORMAT_COMPLEX
  87. #define IM_BANDFMT_DOUBLE VIPS_FORMAT_DOUBLE
  88. #define IM_BANDFMT_DPCOMPLEX VIPS_FORMAT_DPCOMPLEX
  89. #define IM_BANDFMT_LAST VIPS_FORMAT_LAST
  90. #define VipsBandFmt VipsBandFormat
  91. #define IM_SMALLTILE VIPS_DEMAND_STYLE_SMALLTILE
  92. #define IM_FATSTRIP VIPS_DEMAND_STYLE_FATSTRIP
  93. #define IM_THINSTRIP VIPS_DEMAND_STYLE_THINSTRIP
  94. #define IM_ANY VIPS_DEMAND_STYLE_ANY
  95. #define IM_CODING_NONE VIPS_CODING_NONE
  96. #define IM_CODING_LABQ VIPS_CODING_LABQ
  97. #define IM_CODING_RAD VIPS_CODING_RAD
  98. #define IM_TYPE_MULTIBAND VIPS_INTERPRETATION_MULTIBAND
  99. #define IM_TYPE_B_W VIPS_INTERPRETATION_B_W
  100. #define IM_TYPE_HISTOGRAM VIPS_INTERPRETATION_HISTOGRAM
  101. #define IM_TYPE_FOURIER VIPS_INTERPRETATION_FOURIER
  102. #define IM_TYPE_XYZ VIPS_INTERPRETATION_XYZ
  103. #define IM_TYPE_LAB VIPS_INTERPRETATION_LAB
  104. #define IM_TYPE_CMYK VIPS_INTERPRETATION_CMYK
  105. #define IM_TYPE_LABQ VIPS_INTERPRETATION_LABQ
  106. #define IM_TYPE_RGB VIPS_INTERPRETATION_RGB
  107. #define IM_TYPE_UCS VIPS_INTERPRETATION_CMC
  108. #define IM_TYPE_LCH VIPS_INTERPRETATION_LCH
  109. #define IM_TYPE_LABS VIPS_INTERPRETATION_LABS
  110. #define IM_TYPE_sRGB VIPS_INTERPRETATION_sRGB
  111. #define IM_TYPE_YXY VIPS_INTERPRETATION_YXY
  112. #define IM_TYPE_RGB16 VIPS_INTERPRETATION_RGB16
  113. #define IM_TYPE_GREY16 VIPS_INTERPRETATION_GREY16
  114. #define VipsType VipsInterpretation
  115. #define IMAGE VipsImage
  116. #define REGION VipsRegion
  117. #define IM_INTENT_PERCEPTUAL VIPS_INTENT_PERCEPTUAL
  118. #define IM_INTENT_RELATIVE_COLORIMETRIC VIPS_INTENT_RELATIVE
  119. #define IM_INTENT_SATURATION VIPS_INTENT_SATURATION
  120. #define IM_INTENT_ABSOLUTE_COLORIMETRIC VIPS_INTENT_ABSOLUTE
  121. /* Renamed macros.
  122. */
  123. #define IM_MAX VIPS_MAX
  124. #define IM_MIN VIPS_MIN
  125. #define IM_RAD VIPS_RAD
  126. #define IM_DEG VIPS_DEG
  127. #define IM_PI VIPS_PI
  128. #define IM_RINT VIPS_RINT
  129. #define IM_ABS VIPS_ABS
  130. #define IM_NUMBER VIPS_NUMBER
  131. #define IM_CLIP VIPS_CLIP
  132. #define IM_CLIP_UCHAR VIPS_CLIP_UCHAR
  133. #define IM_CLIP_CHAR VIPS_CLIP_CHAR
  134. #define IM_CLIP_USHORT VIPS_CLIP_USHORT
  135. #define IM_CLIP_SHORT VIPS_CLIP_SHORT
  136. #define IM_CLIP_NONE VIPS_CLIP_NONE
  137. #define IM_SWAP VIPS_SWAP
  138. #define IM_IMAGE_ADDR VIPS_IMAGE_ADDR
  139. #define IM_IMAGE_N_ELEMENTS VIPS_IMAGE_N_ELEMENTS
  140. #define IM_IMAGE_SIZEOF_ELEMENT VIPS_IMAGE_SIZEOF_ELEMENT
  141. #define IM_IMAGE_SIZEOF_PEL VIPS_IMAGE_SIZEOF_PEL
  142. #define IM_IMAGE_SIZEOF_LINE VIPS_IMAGE_SIZEOF_LINE
  143. #define IM_REGION_LSKIP VIPS_REGION_LSKIP
  144. #define IM_REGION_ADDR VIPS_REGION_ADDR
  145. #define IM_REGION_ADDR_TOPLEFT VIPS_REGION_ADDR_TOPLEFT
  146. #define IM_REGION_N_ELEMENTS VIPS_REGION_N_ELEMENTS
  147. #define IM_REGION_SIZEOF_LINE VIPS_REGION_SIZEOF_LINE
  148. /* Renamed externs.
  149. */
  150. extern const guint64 vips__image_sizeof_bandformat[];
  151. #define im__sizeof_bandfmt vips__image_sizeof_bandformat
  152. /* Renamed functions.
  153. */
  154. #define im_error vips_error
  155. #define im_verror vips_verror
  156. #define im_verror_system vips_verror_system
  157. #define im_error_system vips_error_system
  158. #define im_error_buffer vips_error_buffer
  159. #define im_error_clear vips_error_clear
  160. #define im_warn vips_warn
  161. #define im_vwarn vips_vwarn
  162. #define im_diag vips_info
  163. #define im_vdiag vips_vinfo
  164. #define error_exit vips_error_exit
  165. #define im_get_argv0 vips_get_argv0
  166. #define im_version_string vips_version_string
  167. #define im_version vips_version
  168. #define im_get_option_group vips_get_option_group
  169. #define im_guess_prefix vips_guess_prefix
  170. #define im_guess_libdir vips_guess_libdir
  171. #define im__global_lock vips__global_lock
  172. int im_cp_desc(IMAGE *out, IMAGE *in );
  173. int im_cp_descv (IMAGE * im, ...);
  174. #define im_cp_desc_array(I, A) vips__image_copy_fields_array(I, A)
  175. int im_demand_hint (IMAGE * im, VipsDemandStyle hint, ...);
  176. #define im_demand_hint_array( A, B, C ) (vips__demand_hint_array( A, B, C ), 0)
  177. #define im_image(P, W, H, B, F) \
  178. vips_image_new_from_memory((P), 0, (W), (H), (B), (F))
  179. #define im_binfile vips_image_new_from_file_raw
  180. #define im__open_temp vips_image_new_temp_file
  181. #define im__test_kill( I ) (vips_image_get_kill( I ))
  182. #define im__start_eval( I ) (vips_image_preeval( I ), vips_image_get_kill( I ))
  183. #define im__handle_eval( I, W, H ) \
  184. (vips_image_eval( I, W, H ), vips_image_get_kill( I ))
  185. #define im__end_eval vips_image_posteval
  186. #define im_invalidate vips_image_invalidate_all
  187. #define im_isfile vips_image_isfile
  188. #define im_printdesc( I ) vips_object_print_dump( VIPS_OBJECT( I ) )
  189. /* im_openout() needs to have this visible.
  190. */
  191. VipsImage *
  192. vips_image_new_mode( const char *filename, const char *mode );
  193. #define im_openout( F ) vips_image_new_mode( F, "w" )
  194. #define im_setbuf( F ) vips_image_new( "t" )
  195. #define im_initdesc( image, \
  196. xsize, ysize, bands, bandbits, bandfmt, coding, \
  197. type, xres, yres, xo, yo ) \
  198. vips_image_init_fields( image, \
  199. xsize, ysize, bands, bandfmt, coding, \
  200. type, xres, yres )
  201. #define im__open_image_file vips__open_image_read
  202. #define im_setupout vips_image_write_prepare
  203. #define im_writeline( Y, IM, P ) vips_image_write_line( IM, Y, P )
  204. #define im_prepare vips_region_prepare
  205. #define im_prepare_to vips_region_prepare_to
  206. #define im_region_create vips_region_new
  207. #define im_region_free g_object_unref
  208. #define im_region_region vips_region_region
  209. #define im_region_buffer vips_region_buffer
  210. #define im_region_black vips_region_black
  211. #define im_region_paint vips_region_paint
  212. #define im_prepare_many vips_region_prepare_many
  213. #define im__region_no_ownership vips__region_no_ownership
  214. #define im_image_sanity( I ) (!vips_object_sanity( VIPS_OBJECT( I ) ))
  215. #define im_image_sanity_all vips_object_sanity_all
  216. #define im__print_all vips_object_print_all
  217. /* Compat functions.
  218. */
  219. int im_init_world( const char *argv0 );
  220. VipsImage *im_open( const char *filename, const char *mode );
  221. VipsImage *im_open_local( VipsImage *parent,
  222. const char *filename, const char *mode );
  223. int im_open_local_array( VipsImage *parent,
  224. VipsImage **images, int n, const char *filename, const char *mode );
  225. #define im_callback_fn VipsCallbackFn
  226. int im_add_callback( VipsImage *im,
  227. const char *callback, im_callback_fn fn, void *a, void *b );
  228. int im_add_callback1( VipsImage *im,
  229. const char *callback, im_callback_fn fn, void *a, void *b );
  230. #define im_add_close_callback( IM, FN, A, B ) \
  231. im_add_callback( IM, "close", FN, A, B )
  232. #define im_add_postclose_callback( IM, FN, A, B ) \
  233. im_add_callback( IM, "postclose", FN, A, B )
  234. #define im_add_preclose_callback( IM, FN, A, B ) \
  235. im_add_callback( IM, "preclose", FN, A, B )
  236. #define im_add_evalstart_callback( IM, FN, A, B ) \
  237. im_add_callback1( IM, "preeval", FN, A, B )
  238. #define im_add_evalend_callback( IM, FN, A, B ) \
  239. im_add_callback1( IM, "posteval", FN, A, B )
  240. #define im_add_eval_callback( IM, FN, A, B ) \
  241. (vips_image_set_progress( IM, TRUE ), \
  242. im_add_callback1( IM, "eval", FN, A, B ))
  243. #define im_add_invalidate_callback( IM, FN, A, B ) \
  244. im_add_callback( IM, "invalidate", FN, A, B )
  245. #define im_bits_of_fmt( fmt ) (vips_format_sizeof( fmt ) << 3)
  246. typedef void *(*im_construct_fn)( void *, void *, void * );
  247. void *im_local( VipsImage *im,
  248. im_construct_fn cons, im_callback_fn dest, void *a, void *b, void *c );
  249. int im_local_array( VipsImage *im, void **out, int n,
  250. im_construct_fn cons, im_callback_fn dest, void *a, void *b, void *c );
  251. int im_close( VipsImage *im );
  252. VipsImage *im_init( const char *filename );
  253. const char *im_Type2char( VipsInterpretation type );
  254. const char *im_BandFmt2char( VipsBandFormat fmt );
  255. const char *im_Coding2char( VipsCoding coding );
  256. const char *im_Compression2char( int n );
  257. const char *im_dtype2char( VipsImageType n );
  258. const char *im_dhint2char( VipsDemandStyle style );
  259. VipsInterpretation im_char2Type( const char *str );
  260. VipsBandFormat im_char2BandFmt( const char *str );
  261. VipsCoding im_char2Coding( const char *str );
  262. VipsImageType im_char2dtype( const char *str );
  263. VipsDemandStyle im_char2dhint( const char *str );
  264. #define Rect VipsRect
  265. #define IM_RECT_RIGHT VIPS_RECT_RIGHT
  266. #define IM_RECT_BOTTOM VIPS_RECT_BOTTOM
  267. #define IM_RECT_HCENTRE VIPS_RECT_HCENTRE
  268. #define IM_RECT_VCENTRE VIPS_RECT_VCENTRE
  269. #define im_rect_marginadjust vips_rect_marginadjust
  270. #define im_rect_includespoint vips_rect_includespoint
  271. #define im_rect_includesrect vips_rect_includesrect
  272. #define im_rect_intersectrect vips_rect_intersectrect
  273. #define im_rect_isempty vips_rect_isempty
  274. #define im_rect_unionrect vips_rect_unionrect
  275. #define im_rect_equalsrect vips_rect_equalsrect
  276. #define im_rect_dup vips_rect_dup
  277. #define im_rect_normalise vips_rect_normalise
  278. #define im_start_one vips_start_one
  279. #define im_stop_one vips_stop_one
  280. #define im_start_many vips_start_many
  281. #define im_stop_many vips_stop_many
  282. #define im_allocate_input_array vips_allocate_input_array
  283. #define im_start_fn VipsStartFn
  284. typedef int (*im_generate_fn)( VipsRegion *out, void *seq, void *a, void *b );
  285. #define im_stop_fn VipsStopFn
  286. int im_generate( VipsImage *im,
  287. im_start_fn start, im_generate_fn generate, im_stop_fn stop,
  288. void *a, void *b );
  289. #define im__mmap vips__mmap
  290. #define im__munmap vips__munmap
  291. #define im_mapfile vips_mapfile
  292. #define im_mapfilerw vips_mapfilerw
  293. #define im_remapfilerw vips_remapfilerw
  294. #define im__print_renders vips__print_renders
  295. int im_cache( IMAGE *in, IMAGE *out, int width, int height, int max );
  296. #define IM_FREEF( F, S ) \
  297. G_STMT_START { \
  298. if( S ) { \
  299. (void) F( (S) ); \
  300. (S) = 0; \
  301. } \
  302. } G_STMT_END
  303. /* Can't just use VIPS_FREEF(), we want the extra cast to void on the argument
  304. * to vips_free() to make sure we can work for "const char *" variables.
  305. */
  306. #define IM_FREE( S ) \
  307. G_STMT_START { \
  308. if( S ) { \
  309. (void) im_free( (void *) (S) ); \
  310. (S) = 0; \
  311. } \
  312. } G_STMT_END
  313. #define IM_SETSTR( S, V ) \
  314. G_STMT_START { \
  315. const char *sst = (V); \
  316. \
  317. if( (S) != sst ) { \
  318. if( !(S) || !sst || strcmp( (S), sst ) != 0 ) { \
  319. IM_FREE( S ); \
  320. if( sst ) \
  321. (S) = im_strdup( NULL, sst ); \
  322. } \
  323. } \
  324. } G_STMT_END
  325. #define im_malloc( IM, SZ ) \
  326. (vips_malloc( VIPS_OBJECT( IM ), (SZ) ))
  327. #define im_free vips_free
  328. #define im_strdup( IM, STR ) \
  329. (vips_strdup( VIPS_OBJECT( IM ), (STR) ))
  330. #define IM_NEW( IM, T ) ((T *) im_malloc( (IM), sizeof( T )))
  331. #define IM_ARRAY( IM, N, T ) ((T *) im_malloc( (IM), (N) * sizeof( T )))
  332. #define im_incheck vips_image_wio_input
  333. #define im_outcheck( I ) (0)
  334. #define im_rwcheck vips_image_inplace
  335. #define im_pincheck vips_image_pio_input
  336. #define im_poutcheck( I ) (0)
  337. #define im_iocheck( I, O ) im_incheck( I )
  338. #define im_piocheck( I, O ) im_pincheck( I )
  339. #define im_check_uncoded vips_check_uncoded
  340. #define im_check_coding_known vips_check_coding_known
  341. #define im_check_coding_labq vips_check_coding_labq
  342. #define im_check_coding_rad vips_check_coding_rad
  343. #define im_check_coding_noneorlabq vips_check_coding_noneorlabq
  344. #define im_check_coding_same vips_check_coding_same
  345. #define im_check_mono vips_check_mono
  346. #define im_check_bands_1or3 vips_check_bands_1or3
  347. #define im_check_bands vips_check_bands
  348. #define im_check_bands_1orn vips_check_bands_1orn
  349. #define im_check_bands_1orn_unary vips_check_bands_1orn_unary
  350. #define im_check_bands_same vips_check_bands_same
  351. #define im_check_bandno vips_check_bandno
  352. #define im_check_int vips_check_int
  353. #define im_check_uint vips_check_uint
  354. #define im_check_uintorf vips_check_uintorf
  355. #define im_check_noncomplex vips_check_noncomplex
  356. #define im_check_complex vips_check_complex
  357. #define im_check_format vips_check_format
  358. #define im_check_u8or16 vips_check_u8or16
  359. #define im_check_8or16 vips_check_8or16
  360. #define im_check_u8or16orf vips_check_u8or16orf
  361. #define im_check_format_same vips_check_format_same
  362. #define im_check_size_same vips_check_size_same
  363. #define im_check_vector vips_check_vector
  364. #define im_check_hist vips_check_hist
  365. #define im_check_imask vips_check_imask
  366. #define im_check_dmask vips_check_dmask
  367. #define vips_bandfmt_isint vips_band_format_isint
  368. #define vips_bandfmt_isuint vips_band_format_isuint
  369. #define vips_bandfmt_isfloat vips_band_format_isfloat
  370. #define vips_bandfmt_iscomplex vips_band_format_iscomplex
  371. #define im__change_suffix vips__change_suffix
  372. /* Buffer processing.
  373. */
  374. typedef void (*im_wrapone_fn)( void *in, void *out, int width,
  375. void *a, void *b );
  376. int im_wrapone( VipsImage *in, VipsImage *out,
  377. im_wrapone_fn fn, void *a, void *b );
  378. typedef void (*im_wraptwo_fn)( void *in1, void *in2, void *out,
  379. int width, void *a, void *b );
  380. int im_wraptwo( VipsImage *in1, VipsImage *in2, VipsImage *out,
  381. im_wraptwo_fn fn, void *a, void *b );
  382. typedef void (*im_wrapmany_fn)( void **in, void *out, int width,
  383. void *a, void *b );
  384. int im_wrapmany( VipsImage **in, VipsImage *out,
  385. im_wrapmany_fn fn, void *a, void *b );
  386. #define IM_META_EXIF_NAME VIPS_META_EXIF_NAME
  387. #define IM_META_ICC_NAME VIPS_META_ICC_NAME
  388. #define IM_META_RESOLUTION_UNIT VIPS_META_RESOLUTION_UNIT
  389. #define IM_TYPE_SAVE_STRING VIPS_TYPE_SAVE_STRING
  390. #define IM_TYPE_BLOB VIPS_TYPE_BLOB
  391. #define IM_TYPE_AREA VIPS_TYPE_AREA
  392. #define IM_TYPE_REF_STRING VIPS_TYPE_REF_STRING
  393. #define im_header_map_fn VipsImageMapFn
  394. #define im_header_map vips_image_map
  395. #define im_header_int vips_image_get_int
  396. #define im_header_double vips_image_get_double
  397. #define im_header_string( IMAGE, FIELD, STRING ) \
  398. vips_image_get_string( IMAGE, FIELD, (const char **) STRING )
  399. #define im_header_as_string vips_image_get_as_string
  400. #define im_header_get_typeof vips_image_get_typeof
  401. #define im_header_get vips_image_get
  402. #define im_histlin vips_image_history_printf
  403. #define im_updatehist vips_image_history_args
  404. #define im_history_get vips_image_get_history
  405. #define im_save_string_get vips_value_get_save_string
  406. #define im_save_string_set vips_value_set_save_string
  407. #define im_save_string_setf vips_value_set_save_stringf
  408. #define im_ref_string_set vips_value_set_ref_string
  409. #define im_ref_string_get( V ) vips_value_get_ref_string( V, NULL )
  410. size_t im_ref_string_get_length( const GValue *value );
  411. #define im_blob_get vips_value_get_blob
  412. #define im_blob_set vips_value_set_blob
  413. #define im_meta_set( A, B, C ) (vips_image_set( A, B, C ), 0)
  414. #define im_meta_remove vips_image_remove
  415. #define im_meta_get vips_image_get
  416. #define im_meta_get_typeof vips_image_get_typeof
  417. #define im_meta_set_int( A, B, C ) (vips_image_set_int( A, B, C ), 0)
  418. #define im_meta_get_int vips_image_get_int
  419. #define im_meta_set_double( A, B, C ) (vips_image_set_double( A, B, C ), 0)
  420. #define im_meta_get_double vips_image_get_double
  421. #define im_meta_set_area( A, B, C, D ) (vips_image_set_area( A, B, C, D ), 0)
  422. #define im_meta_get_area vips_image_get_area
  423. #define im_meta_set_string( A, B, C ) (vips_image_set_string( A, B, C ), 0)
  424. #define im_meta_get_string vips_image_get_string
  425. #define im_meta_set_blob( A, B, C, D, E ) \
  426. (vips_image_set_blob( A, B, C, D, E ), 0)
  427. #define im_meta_get_blob vips_image_get_blob
  428. #define im_semaphore_t VipsSemaphore
  429. #define im_semaphore_up vips_semaphore_up
  430. #define im_semaphore_down vips_semaphore_down
  431. #define im_semaphore_upn vips_semaphore_upn
  432. #define im_semaphore_downn vips_semaphore_downn
  433. #define im_semaphore_destroy vips_semaphore_destroy
  434. #define im_semaphore_init vips_semaphore_init
  435. #define im__open_image_read vips__open_image_read
  436. #define im_image_open_input vips_image_open_input
  437. #define im_image_open_output vips_image_open_output
  438. #define im__has_extension_block vips__has_extension_block
  439. #define im__read_extension_block vips__read_extension_block
  440. #define im__write_extension_block vips__write_extension_block
  441. #define im__writehist vips__writehist
  442. #define im__read_header_bytes vips__read_header_bytes
  443. #define im__write_header_bytes vips__write_header_bytes
  444. #define VSListMap2Fn VipsSListMap2Fn
  445. #define VSListMap4Fn VipsSListMap4Fn
  446. #define VSListFold2Fn VipsSListFold2Fn
  447. #define im_slist_equal vips_slist_equal
  448. #define im_slist_map2 vips_slist_map2
  449. #define im_slist_map2_rev vips_slist_map2_rev
  450. #define im_slist_map4 vips_slist_map4
  451. #define im_slist_fold2 vips_slist_fold2
  452. #define im_slist_filter vips_slist_filter
  453. #define im_slist_free_all vips_slist_free_all
  454. #define im_map_equal vips_map_equal
  455. #define im_hash_table_map vips_hash_table_map
  456. #define im_strncpy vips_strncpy
  457. #define im_strrstr vips_strrstr
  458. #define im_ispostfix vips_ispostfix
  459. #define im_isprefix vips_isprefix
  460. #define im_break_token vips_break_token
  461. #define im_vsnprintf vips_vsnprintf
  462. #define im_snprintf vips_snprintf
  463. #define im_file_length vips_file_length
  464. #define im__write vips__write
  465. #define im__file_open_read vips__file_open_read
  466. #define im__file_open_write vips__file_open_write
  467. #define im__file_read vips__file_read
  468. #define im__file_read_name vips__file_read_name
  469. #define im__file_write vips__file_write
  470. #define im__get_bytes vips__get_bytes
  471. #define im__gvalue_ref_string_new vips__gvalue_ref_string_new
  472. #define im__gslist_gvalue_free vips__gslist_gvalue_free
  473. #define im__gslist_gvalue_copy vips__gslist_gvalue_copy
  474. #define im__gslist_gvalue_merge vips__gslist_gvalue_merge
  475. #define im__gslist_gvalue_get vips__gslist_gvalue_get
  476. #define im__seek vips__seek
  477. #define im__ftruncate vips__ftruncate
  478. #define im_existsf vips_existsf
  479. #define im_popenf vips_popenf
  480. #define im_ispoweroftwo vips_ispoweroftwo
  481. #define im_amiMSBfirst vips_amiMSBfirst
  482. #define im__temp_name vips__temp_name
  483. #define IM_VERSION_STRING VIPS_VERSION_STRING
  484. #define IM_MAJOR_VERSION VIPS_MAJOR_VERSION
  485. #define IM_MINOR_VERSION VIPS_MINOR_VERSION
  486. #define IM_MICRO_VERSION VIPS_MICRO_VERSION
  487. #define IM_EXEEXT VIPS_EXEEXT
  488. #define IM_SIZEOF_HEADER VIPS_SIZEOF_HEADER
  489. #define im_concurrency_set vips_concurrency_set
  490. #define im_concurrency_get vips_concurrency_get
  491. int im_init_world( const char *argv0 );
  492. int im_add( VipsImage *in1, VipsImage *in2, VipsImage *out );
  493. int im_subtract( VipsImage *in1, VipsImage *in2, VipsImage *out );
  494. int im_multiply( VipsImage *in1, VipsImage *in2, VipsImage *out );
  495. int im_divide( VipsImage *in1, VipsImage *in2, VipsImage *out );
  496. int im_min( VipsImage *in, double *out );
  497. int im_minpos( VipsImage *in, int *xpos, int *ypos, double *out );
  498. int im_max( VipsImage *in, double *out );
  499. int im_maxpos( VipsImage *in, int *xpos, int *ypos, double *out );
  500. int im_avg( VipsImage *in, double *out );
  501. int im_deviate( VipsImage *in, double *out );
  502. int im_invert( VipsImage *in, VipsImage *out );
  503. int im_lintra( double a, VipsImage *in, double b, VipsImage *out );
  504. int im_lintra_vec( int n, double *a, VipsImage *in, double *b, VipsImage *out );
  505. int im_abs( VipsImage *in, VipsImage *out );
  506. int im_sign( VipsImage *in, VipsImage *out );
  507. DOUBLEMASK *im_stats( VipsImage *in );
  508. DOUBLEMASK *im_measure_area( VipsImage *im,
  509. int left, int top, int width, int height,
  510. int h, int v,
  511. int *sel, int nsel, const char *name );
  512. int im_sintra( VipsImage *in, VipsImage *out );
  513. int im_costra( VipsImage *in, VipsImage *out );
  514. int im_tantra( VipsImage *in, VipsImage *out );
  515. int im_asintra( VipsImage *in, VipsImage *out );
  516. int im_acostra( VipsImage *in, VipsImage *out );
  517. int im_atantra( VipsImage *in, VipsImage *out );
  518. int im_logtra( VipsImage *in, VipsImage *out );
  519. int im_log10tra( VipsImage *in, VipsImage *out );
  520. int im_exptra( VipsImage *in, VipsImage *out );
  521. int im_exp10tra( VipsImage *in, VipsImage *out );
  522. int im_floor( VipsImage *in, VipsImage *out );
  523. int im_rint( VipsImage *in, VipsImage *out );
  524. int im_ceil( VipsImage *in, VipsImage *out );
  525. int im_equal( VipsImage *in1, VipsImage *in2, VipsImage *out );
  526. int im_notequal( VipsImage *in1, VipsImage *in2, VipsImage *out );
  527. int im_less( VipsImage *in1, VipsImage *in2, VipsImage *out );
  528. int im_lesseq( VipsImage *in1, VipsImage *in2, VipsImage *out );
  529. int im_more( VipsImage *in1, VipsImage *in2, VipsImage *out );
  530. int im_moreeq( VipsImage *in1, VipsImage *in2, VipsImage *out );
  531. int im_andimage( VipsImage *in1, VipsImage *in2, VipsImage *out );
  532. int im_orimage( VipsImage *in1, VipsImage *in2, VipsImage *out );
  533. int im_eorimage( VipsImage *in1, VipsImage *in2, VipsImage *out );
  534. int im_andimage_vec( VipsImage *in, VipsImage *out, int n, double *c );
  535. int im_orimage_vec( VipsImage *in, VipsImage *out, int n, double *c );
  536. int im_eorimage_vec( VipsImage *in, VipsImage *out, int n, double *c );
  537. int im_andimageconst( VipsImage *in, VipsImage *out, double c );
  538. int im_orimageconst( VipsImage *in, VipsImage *out, double c );
  539. int im_eorimageconst( VipsImage *in, VipsImage *out, double c );
  540. int im_shiftleft_vec( VipsImage *in, VipsImage *out, int n, double *c );
  541. int im_shiftleft( VipsImage *in, VipsImage *out, int n );
  542. int im_shiftright_vec( VipsImage *in, VipsImage *out, int n, double *c );
  543. int im_shiftright( VipsImage *in, VipsImage *out, int n );
  544. int im_remainder( VipsImage *in1, VipsImage *in2, VipsImage *out );
  545. int im_remainder_vec( VipsImage *in, VipsImage *out, int n, double *c );
  546. int im_remainderconst( VipsImage *in, VipsImage *out, double c );
  547. int im_powtra( VipsImage *in, VipsImage *out, double e );
  548. int im_powtra_vec( VipsImage *in, VipsImage *out, int n, double *e );
  549. int im_expntra( VipsImage *in, VipsImage *out, double e );
  550. int im_expntra_vec( VipsImage *in, VipsImage *out, int n, double *e );
  551. int im_equal_vec( VipsImage *in, VipsImage *out, int n, double *c );
  552. int im_notequal_vec( VipsImage *in, VipsImage *out, int n, double *c );
  553. int im_less_vec( VipsImage *in, VipsImage *out, int n, double *c );
  554. int im_lesseq_vec( VipsImage *in, VipsImage *out, int n, double *c );
  555. int im_more_vec( VipsImage *in, VipsImage *out, int n, double *c );
  556. int im_moreeq_vec( VipsImage *in, VipsImage *out, int n, double *c );
  557. int im_equalconst( VipsImage *in, VipsImage *out, double c );
  558. int im_notequalconst( VipsImage *in, VipsImage *out, double c );
  559. int im_lessconst( VipsImage *in, VipsImage *out, double c );
  560. int im_lesseqconst( VipsImage *in, VipsImage *out, double c );
  561. int im_moreconst( VipsImage *in, VipsImage *out, double c );
  562. int im_moreeqconst( VipsImage *in, VipsImage *out, double c );
  563. int im_maxpos_vec( VipsImage *im, int *xpos, int *ypos, double *maxima, int n );
  564. int im_minpos_vec( VipsImage *im, int *xpos, int *ypos, double *minima, int n );
  565. int im_maxpos_avg( VipsImage *im, double *xpos, double *ypos, double *out );
  566. int im_linreg( VipsImage **ins, VipsImage *out, double *xs );
  567. int im_cross_phase( VipsImage *a, VipsImage *b, VipsImage *out );
  568. int im_point( VipsImage *im, VipsInterpolate *interpolate,
  569. double x, double y, int band, double *out );
  570. int im_point_bilinear( VipsImage *im,
  571. double x, double y, int band, double *out );
  572. int im_copy( VipsImage *in, VipsImage *out );
  573. int im_copy_set( VipsImage *in, VipsImage *out,
  574. VipsInterpretation interpretation,
  575. float xres, float yres, int xoffset, int yoffset );
  576. int im_copy_set_meta( VipsImage *in, VipsImage *out,
  577. const char *field, GValue *value );
  578. int im_copy_morph( VipsImage *in, VipsImage *out,
  579. int bands, VipsBandFormat format, VipsCoding coding );
  580. int im_copy_swap( VipsImage *in, VipsImage *out );
  581. int im_copy_file( VipsImage *in, VipsImage *out );
  582. int im_copy_native( VipsImage *in, VipsImage *out, gboolean is_msb_first );
  583. int im_embed( VipsImage *in, VipsImage *out,
  584. int type, int x, int y, int width, int height );
  585. int im_fliphor( VipsImage *in, VipsImage *out );
  586. int im_flipver( VipsImage *in, VipsImage *out );
  587. int im_insert( VipsImage *main, VipsImage *sub, VipsImage *out, int x, int y );
  588. int im_insert_noexpand( VipsImage *main, VipsImage *sub, VipsImage *out, int x, int y );
  589. int im_lrjoin( VipsImage *left, VipsImage *right, VipsImage *out );
  590. int im_tbjoin( VipsImage *top, VipsImage *bottom, VipsImage *out );
  591. int im_extract_area( VipsImage *in, VipsImage *out,
  592. int left, int top, int width, int height );
  593. int im_extract_band( VipsImage *in, VipsImage *out, int band );
  594. int im_extract_bands( VipsImage *in, VipsImage *out, int band, int nbands );
  595. int im_extract_areabands( VipsImage *in, VipsImage *out,
  596. int left, int top, int width, int height, int band, int nbands );
  597. int im_replicate( VipsImage *in, VipsImage *out, int across, int down );
  598. int im_wrap( VipsImage *in, VipsImage *out, int x, int y );
  599. int im_rotquad( VipsImage *in, VipsImage *out );
  600. int im_clip2fmt( VipsImage *in, VipsImage *out, VipsBandFormat fmt );
  601. int im_bandjoin( VipsImage *in1, VipsImage *in2, VipsImage *out );
  602. int im_gbandjoin( VipsImage **in, VipsImage *out, int n );
  603. int im_rank_image( VipsImage **in, VipsImage *out, int n, int index );
  604. int im_maxvalue( VipsImage **in, VipsImage *out, int n );
  605. int im_grid( VipsImage *in, VipsImage *out, int tile_height, int across, int down );
  606. int im_scale( VipsImage *in, VipsImage *out );
  607. int im_scaleps( VipsImage *in, VipsImage *out );
  608. int im_msb( VipsImage *in, VipsImage *out );
  609. int im_msb_band( VipsImage *in, VipsImage *out, int band );
  610. int im_zoom( VipsImage *in, VipsImage *out, int xfac, int yfac );
  611. int im_subsample( VipsImage *in, VipsImage *out, int xshrink, int yshrink );
  612. int im_gaussnoise( VipsImage *out, int x, int y, double mean, double sigma );
  613. int im_text( VipsImage *out, const char *text, const char *font,
  614. int width, int alignment, int dpi );
  615. int im_black( VipsImage *out, int x, int y, int bands );
  616. int im_make_xy( VipsImage *out, const int xsize, const int ysize );
  617. int im_zone( VipsImage *out, int size );
  618. int im_fzone( VipsImage *out, int size );
  619. int im_feye( VipsImage *out,
  620. const int xsize, const int ysize, const double factor );
  621. int im_eye( VipsImage *out,
  622. const int xsize, const int ysize, const double factor );
  623. int im_grey( VipsImage *out, const int xsize, const int ysize );
  624. int im_fgrey( VipsImage *out, const int xsize, const int ysize );
  625. int im_sines( VipsImage *out,
  626. int xsize, int ysize, double horfreq, double verfreq );
  627. int im_buildlut( DOUBLEMASK *input, VipsImage *output );
  628. int im_invertlut( DOUBLEMASK *input, VipsImage *output, int lut_size );
  629. int im_identity( VipsImage *lut, int bands );
  630. int im_identity_ushort( VipsImage *lut, int bands, int sz );
  631. int im_tone_build_range( VipsImage *out,
  632. int in_max, int out_max,
  633. double Lb, double Lw, double Ps, double Pm, double Ph,
  634. double S, double M, double H );
  635. int im_tone_build( VipsImage *out,
  636. double Lb, double Lw, double Ps, double Pm, double Ph,
  637. double S, double M, double H );
  638. int im_system( VipsImage *im, const char *cmd, char **out );
  639. VipsImage *im_system_image( VipsImage *im,
  640. const char *in_format, const char *out_format, const char *cmd_format,
  641. char **log );
  642. int im_c2amph( VipsImage *in, VipsImage *out );
  643. int im_c2rect( VipsImage *in, VipsImage *out );
  644. int im_c2imag( VipsImage *in, VipsImage *out );
  645. int im_c2real( VipsImage *in, VipsImage *out );
  646. int im_ri2c( VipsImage *in1, VipsImage *in2, VipsImage *out );
  647. int im_rot90( VipsImage *in, VipsImage *out );
  648. int im_rot180( VipsImage *in, VipsImage *out );
  649. int im_rot270( VipsImage *in, VipsImage *out );
  650. int im_ifthenelse( VipsImage *c, VipsImage *a, VipsImage *b, VipsImage *out );
  651. int im_blend( VipsImage *c, VipsImage *a, VipsImage *b, VipsImage *out );
  652. DOUBLEMASK *im_vips2mask( VipsImage *in, const char *filename );
  653. INTMASK *im_vips2imask( IMAGE *in, const char *filename );
  654. int im_mask2vips( DOUBLEMASK *in, VipsImage *out );
  655. int im_imask2vips( INTMASK *in, VipsImage *out );
  656. int im_bandmean( VipsImage *in, VipsImage *out );
  657. int im_recomb( VipsImage *in, VipsImage *out, DOUBLEMASK *recomb );
  658. int im_argb2rgba( VipsImage *in, VipsImage *out );
  659. int im_falsecolour( VipsImage *in, VipsImage *out );
  660. int im_gammacorrect( VipsImage *in, VipsImage *out, double exponent );
  661. int im_tile_cache_random( IMAGE *in, IMAGE *out,
  662. int tile_width, int tile_height, int max_tiles );
  663. int im_shrink( VipsImage *in, VipsImage *out, double xshrink, double yshrink );
  664. int im_affinei( VipsImage *in, VipsImage *out,
  665. VipsInterpolate *interpolate,
  666. double a, double b, double c, double d, double dx, double dy,
  667. int ox, int oy, int ow, int oh );
  668. int im_affinei_all( VipsImage *in, VipsImage *out, VipsInterpolate *interpolate,
  669. double a, double b, double c, double d, double dx, double dy ) ;
  670. int im_rightshift_size( VipsImage *in, VipsImage *out,
  671. int xshift, int yshift, int band_fmt );
  672. int im_Lab2XYZ_temp( IMAGE *in, IMAGE *out, double X0, double Y0, double Z0 );
  673. int im_Lab2XYZ( IMAGE *in, IMAGE *out );
  674. int im_XYZ2Lab( VipsImage *in, VipsImage *out );
  675. int im_XYZ2Lab_temp( VipsImage *in, VipsImage *out,
  676. double X0, double Y0, double Z0 );
  677. int im_Lab2LCh( VipsImage *in, VipsImage *out );
  678. int im_LCh2Lab( VipsImage *in, VipsImage *out );
  679. int im_LCh2UCS( VipsImage *in, VipsImage *out );
  680. int im_UCS2LCh( VipsImage *in, VipsImage *out );
  681. int im_XYZ2Yxy( VipsImage *in, VipsImage *out );
  682. int im_Yxy2XYZ( VipsImage *in, VipsImage *out );
  683. int im_float2rad( VipsImage *in, VipsImage *out );
  684. int im_rad2float( VipsImage *in, VipsImage *out );
  685. int im_Lab2LabQ( VipsImage *in, VipsImage *out );
  686. int im_LabQ2Lab( VipsImage *in, VipsImage *out );
  687. int im_Lab2LabS( VipsImage *in, VipsImage *out );
  688. int im_LabS2Lab( VipsImage *in, VipsImage *out );
  689. int im_LabQ2LabS( VipsImage *in, VipsImage *out );
  690. int im_LabS2LabQ( VipsImage *in, VipsImage *out );
  691. int im_LabQ2sRGB( VipsImage *in, VipsImage *out );
  692. int im_XYZ2sRGB( IMAGE *in, IMAGE *out );
  693. int im_sRGB2XYZ( IMAGE *in, IMAGE *out );
  694. struct im_col_display;
  695. #define im_col_displays(S) (NULL)
  696. #define im_LabQ2disp_build_table(A, B) (NULL)
  697. #define im_LabQ2disp_table(A, B, C) (im_LabQ2disp(A, B, C))
  698. int im_Lab2disp( IMAGE *in, IMAGE *out, struct im_col_display *disp );
  699. int im_disp2Lab( IMAGE *in, IMAGE *out, struct im_col_display *disp );
  700. int im_dE_fromdisp( IMAGE *, IMAGE *, IMAGE *, struct im_col_display * );
  701. int im_dECMC_fromdisp( IMAGE *, IMAGE *, IMAGE *, struct im_col_display * );
  702. #define im_disp2XYZ(A, B, C) (im_sRGB2XYZ(A, B))
  703. #define im_XYZ2disp(A, B, C) (im_XYZ2sRGB(A, B))
  704. #define im_LabQ2disp(A, B, C) (im_LabQ2sRGB(A, B))
  705. int im_icc_transform( VipsImage *in, VipsImage *out,
  706. const char *input_profile_filename,
  707. const char *output_profile_filename,
  708. VipsIntent intent );
  709. #define im_icc_present vips_icc_present
  710. int im_icc_import( VipsImage *in, VipsImage *out,
  711. const char *input_profile_filename, VipsIntent intent );
  712. int im_icc_import_embedded( VipsImage *in, VipsImage *out, VipsIntent intent );
  713. int im_icc_export_depth( VipsImage *in, VipsImage *out, int depth,
  714. const char *output_profile_filename, VipsIntent intent );
  715. int im_icc_ac2rc( VipsImage *in, VipsImage *out, const char *profile_filename );
  716. int im_LabQ2XYZ( VipsImage *in, VipsImage *out );
  717. int im_UCS2XYZ( VipsImage *in, VipsImage *out );
  718. int im_UCS2Lab( VipsImage *in, VipsImage *out );
  719. int im_Lab2UCS( VipsImage *in, VipsImage *out );
  720. int im_XYZ2UCS( VipsImage *in, VipsImage *out );
  721. int im_dE_fromLab( VipsImage *in1, VipsImage *in2, VipsImage *out );
  722. int im_dECMC_fromLab( VipsImage *in1, VipsImage *in2, VipsImage *out );
  723. int im_dE_fromXYZ( VipsImage *in1, VipsImage *in2, VipsImage *out );
  724. int im_dE00_fromLab( VipsImage *in1, VipsImage *in2, VipsImage *out );
  725. int im_lab_morph( VipsImage *in, VipsImage *out,
  726. DOUBLEMASK *mask,
  727. double L_offset, double L_scale,
  728. double a_scale, double b_scale );
  729. #define im_col_dE00 vips_col_dE00
  730. int im_quadratic( IMAGE *in, IMAGE *out, IMAGE *coeff );
  731. int im_maplut( VipsImage *in, VipsImage *out, VipsImage *lut );
  732. int im_hist( VipsImage *in, VipsImage *out, int bandno );
  733. int im_histgr( VipsImage *in, VipsImage *out, int bandno );
  734. int im_histcum( VipsImage *in, VipsImage *out );
  735. int im_histnorm( VipsImage *in, VipsImage *out );
  736. int im_histeq( VipsImage *in, VipsImage *out );
  737. int im_heq( VipsImage *in, VipsImage *out, int bandno );
  738. int im_histnD( VipsImage *in, VipsImage *out, int bins );
  739. int im_hist_indexed( VipsImage *index, VipsImage *value, VipsImage *out );
  740. int im_histplot( VipsImage *in, VipsImage *out );
  741. int im_project( VipsImage *in, VipsImage *hout, VipsImage *vout );
  742. int im_profile( IMAGE *in, IMAGE *out, int dir );
  743. int im_hsp( VipsImage *in, VipsImage *ref, VipsImage *out );
  744. int im_histspec( VipsImage *in, VipsImage *ref, VipsImage *out );
  745. int im_lhisteq( VipsImage *in, VipsImage *out, int xwin, int ywin );
  746. int im_stdif( VipsImage *in, VipsImage *out,
  747. double a, double m0, double b, double s0, int xwin, int ywin );
  748. int im_mpercent( VipsImage *in, double percent, int *out );
  749. int im_mpercent_hist( VipsImage *hist, double percent, int *out );
  750. int im_ismonotonic( VipsImage *lut, int *out );
  751. int im_tone_analyse( VipsImage *in, VipsImage *out,
  752. double Ps, double Pm, double Ph, double S, double M, double H );
  753. int im_tone_map( VipsImage *in, VipsImage *out, VipsImage *lut );
  754. /* Not really correct, but who uses these.
  755. */
  756. #define im_lhisteq_raw im_lhisteq
  757. #define im_stdif_raw im_stdif
  758. /* ruby-vips uses this
  759. */
  760. #define vips_class_map_concrete_all vips_class_map_all
  761. int im_dilate( VipsImage *in, VipsImage *out, INTMASK *mask );
  762. int im_erode( VipsImage *in, VipsImage *out, INTMASK *mask );
  763. int im_aconv( VipsImage *in, VipsImage *out,
  764. DOUBLEMASK *mask, int n_layers, int cluster );
  765. int im_conv( VipsImage *in, VipsImage *out, INTMASK *mask );
  766. int im_conv_f( VipsImage *in, VipsImage *out, DOUBLEMASK *mask );
  767. int im_aconvsep( VipsImage *in, VipsImage *out,
  768. DOUBLEMASK *mask, int n_layers );
  769. int im_convsep( VipsImage *in, VipsImage *out, INTMASK *mask );
  770. int im_convsep_f( VipsImage *in, VipsImage *out, DOUBLEMASK *mask );
  771. int im_compass( VipsImage *in, VipsImage *out, INTMASK *mask );
  772. int im_gradient( VipsImage *in, VipsImage *out, INTMASK *mask );
  773. int im_lindetect( VipsImage *in, VipsImage *out, INTMASK *mask );
  774. int im_addgnoise( VipsImage *in, VipsImage *out, double sigma );
  775. int im_contrast_surface_raw( IMAGE *in, IMAGE *out,
  776. int half_win_size, int spacing );
  777. int im_contrast_surface( VipsImage *in, VipsImage *out,
  778. int half_win_size, int spacing );
  779. int im_grad_x( VipsImage *in, VipsImage *out );
  780. int im_grad_y( VipsImage *in, VipsImage *out );
  781. int im_fastcor( VipsImage *in, VipsImage *ref, VipsImage *out );
  782. int im_spcor( VipsImage *in, VipsImage *ref, VipsImage *out );
  783. int im_gradcor( VipsImage *in, VipsImage *ref, VipsImage *out );
  784. int im_sharpen( VipsImage *in, VipsImage *out,
  785. int mask_size,
  786. double x1, double y2, double y3,
  787. double m1, double m2 );
  788. typedef enum {
  789. IM_MASK_IDEAL_HIGHPASS = 0,
  790. IM_MASK_IDEAL_LOWPASS = 1,
  791. IM_MASK_BUTTERWORTH_HIGHPASS = 2,
  792. IM_MASK_BUTTERWORTH_LOWPASS = 3,
  793. IM_MASK_GAUSS_HIGHPASS = 4,
  794. IM_MASK_GAUSS_LOWPASS = 5,
  795. IM_MASK_IDEAL_RINGPASS = 6,
  796. IM_MASK_IDEAL_RINGREJECT = 7,
  797. IM_MASK_BUTTERWORTH_RINGPASS = 8,
  798. IM_MASK_BUTTERWORTH_RINGREJECT = 9,
  799. IM_MASK_GAUSS_RINGPASS = 10,
  800. IM_MASK_GAUSS_RINGREJECT = 11,
  801. IM_MASK_IDEAL_BANDPASS = 12,
  802. IM_MASK_IDEAL_BANDREJECT = 13,
  803. IM_MASK_BUTTERWORTH_BANDPASS = 14,
  804. IM_MASK_BUTTERWORTH_BANDREJECT = 15,
  805. IM_MASK_GAUSS_BANDPASS = 16,
  806. IM_MASK_GAUSS_BANDREJECT = 17,
  807. IM_MASK_FRACTAL_FLT = 18
  808. } ImMaskType;
  809. /* We had them in the VIPS namespace for a while before deprecating them.
  810. */
  811. #define VIPS_MASK_IDEAL_HIGHPASS IM_MASK_IDEAL_HIGHPASS
  812. #define VIPS_MASK_IDEAL_LOWPASS IM_MASK_IDEAL_LOWPASS
  813. #define VIPS_MASK_BUTTERWORTH_HIGHPASS IM_MASK_BUTTERWORTH_HIGHPASS
  814. #define VIPS_MASK_BUTTERWORTH_LOWPASS IM_MASK_BUTTERWORTH_LOWPASS
  815. #define VIPS_MASK_GAUSS_HIGHPASS IM_MASK_GAUSS_HIGHPASS
  816. #define VIPS_MASK_GAUSS_LOWPASS IM_MASK_GAUSS_LOWPASS
  817. #define VIPS_MASK_IDEAL_RINGPASS IM_MASK_IDEAL_RINGPASS
  818. #define VIPS_MASK_IDEAL_RINGREJECT IM_MASK_IDEAL_RINGREJECT
  819. #define VIPS_MASK_BUTTERWORTH_RINGPASS IM_MASK_BUTTERWORTH_RINGPASS
  820. #define VIPS_MASK_BUTTERWORTH_RINGREJECT IM_MASK_BUTTERWORTH_RINGREJECT
  821. #define VIPS_MASK_GAUSS_RINGPASS IM_MASK_GAUSS_RINGPASS
  822. #define VIPS_MASK_GAUSS_RINGREJECT IM_MASK_GAUSS_RINGREJECT
  823. #define VIPS_MASK_IDEAL_BANDPASS IM_MASK_IDEAL_BANDPASS
  824. #define VIPS_MASK_IDEAL_BANDREJECT IM_MASK_IDEAL_BANDREJECT
  825. #define VIPS_MASK_BUTTERWORTH_BANDPASS IM_MASK_BUTTERWORTH_BANDPASS
  826. #define VIPS_MASK_BUTTERWORTH_BANDREJECT IM_MASK_BUTTERWORTH_BANDREJECT
  827. #define VIPS_MASK_GAUSS_BANDPASS IM_MASK_GAUSS_BANDPASS
  828. #define VIPS_MASK_GAUSS_BANDREJECT IM_MASK_GAUSS_BANDREJECT
  829. #define VIPS_MASK_FRACTAL_FLT IM_MASK_FRACTAL_FLT
  830. #define VIPS_MASK IM_MASK
  831. int im_flt_image_freq( VipsImage *in, VipsImage *out, ImMaskType flag, ... );
  832. int im_create_fmask( VipsImage *out,
  833. int xsize, int ysize, ImMaskType flag, ... );
  834. int im_fwfft( VipsImage *in, VipsImage *out );
  835. int im_invfft( VipsImage *in, VipsImage *out );
  836. int im_invfftr( VipsImage *in, VipsImage *out );
  837. int im_freqflt( VipsImage *in, VipsImage *mask, VipsImage *out );
  838. int im_disp_ps( VipsImage *in, VipsImage *out );
  839. int im_fractsurf( VipsImage *out, int size, double frd );
  840. int im_phasecor_fft( VipsImage *in1, VipsImage *in2, VipsImage *out );
  841. int im_cntlines( VipsImage *im, double *nolines, int flag );
  842. int im_label_regions( VipsImage *test, VipsImage *mask, int *segments );
  843. int im_rank( VipsImage *in, VipsImage *out, int width, int height, int index );
  844. int im_zerox( VipsImage *in, VipsImage *out, int sign );
  845. int im_benchmarkn( VipsImage *in, VipsImage *out, int n );
  846. int im_benchmark2( VipsImage *in, double *out );
  847. int im_draw_circle( VipsImage *image,
  848. int x, int y, int radius, gboolean fill, VipsPel *ink );
  849. int im_draw_mask( VipsImage *image,
  850. VipsImage *mask_im, int x, int y, VipsPel *ink );
  851. int im_draw_image( VipsImage *image, VipsImage *sub, int x, int y );
  852. int im_draw_rect( VipsImage *image,
  853. int left, int top, int width, int height, int fill, VipsPel *ink );
  854. typedef int (*VipsPlotFn)( VipsImage *image, int x, int y,
  855. void *a, void *b, void *c );
  856. int im_draw_line_user( VipsImage *image,
  857. int x1, int y1, int x2, int y2,
  858. VipsPlotFn plot, void *a, void *b, void *c );
  859. int im_draw_line( VipsImage *image,
  860. int x1, int y1, int x2, int y2, VipsPel *ink );
  861. int im_lineset( VipsImage *in, VipsImage *out, VipsImage *mask, VipsImage *ink,
  862. int n, int *x1v, int *y1v, int *x2v, int *y2v );
  863. int im_insertset( VipsImage *main, VipsImage *sub, VipsImage *out, int n, int *x, int *y );
  864. int im_draw_flood( VipsImage *image, int x, int y, VipsPel *ink, VipsRect *dout );
  865. int im_draw_flood_blob( VipsImage *image,
  866. int x, int y, VipsPel *ink, VipsRect *dout );
  867. int im_draw_flood_other( VipsImage *image, VipsImage *test,
  868. int x, int y, int serial, VipsRect *dout );
  869. int im_draw_point( VipsImage *image, int x, int y, VipsPel *ink );
  870. int im_read_point( VipsImage *image, int x, int y, VipsPel *ink );
  871. int im_draw_smudge( VipsImage *image,
  872. int left, int top, int width, int height );
  873. void im_filename_split( const char *path, char *name, char *mode );
  874. const char *im_skip_dir( const char *filename );
  875. void im_filename_suffix( const char *path, char *suffix );
  876. int im_filename_suffix_match( const char *path, const char *suffixes[] );
  877. char *im_getnextoption( char **in );
  878. char *im_getsuboption( const char *buf );
  879. int im_lrmerge( VipsImage *ref, VipsImage *sec, VipsImage *out,
  880. int dx, int dy, int mwidth );
  881. int im_tbmerge( VipsImage *ref, VipsImage *sec, VipsImage *out,
  882. int dx, int dy, int mwidth );
  883. int im_lrmosaic( VipsImage *ref, VipsImage *sec, VipsImage *out,
  884. int bandno,
  885. int xref, int yref, int xsec, int ysec,
  886. int hwindowsize, int hsearchsize,
  887. int balancetype,
  888. int mwidth );
  889. int im_tbmosaic( VipsImage *ref, VipsImage *sec, VipsImage *out,
  890. int bandno,
  891. int xref, int yref, int xsec, int ysec,
  892. int hwindowsize, int hsearchsize,
  893. int balancetype,
  894. int mwidth );
  895. int im_match_linear( VipsImage *ref, VipsImage *sec, VipsImage *out,
  896. int xr1, int yr1, int xs1, int ys1,
  897. int xr2, int yr2, int xs2, int ys2 );
  898. int im_match_linear_search( VipsImage *ref, VipsImage *sec, VipsImage *out,
  899. int xr1, int yr1, int xs1, int ys1,
  900. int xr2, int yr2, int xs2, int ys2,
  901. int hwindowsize, int hsearchsize );
  902. int im_global_balance( VipsImage *in, VipsImage *out, double gamma );
  903. int im_global_balancef( VipsImage *in, VipsImage *out, double gamma );
  904. int im_remosaic( VipsImage *in, VipsImage *out,
  905. const char *old_str, const char *new_str );
  906. int im_lrmerge1( VipsImage *ref, VipsImage *sec, VipsImage *out,
  907. int xr1, int yr1, int xs1, int ys1,
  908. int xr2, int yr2, int xs2, int ys2,
  909. int mwidth );
  910. int im_tbmerge1( VipsImage *ref, VipsImage *sec, VipsImage *out,
  911. int xr1, int yr1, int xs1, int ys1,
  912. int xr2, int yr2, int xs2, int ys2,
  913. int mwidth );
  914. int im_lrmosaic1( VipsImage *ref, VipsImage *sec, VipsImage *out,
  915. int bandno,
  916. int xr1, int yr1, int xs1, int ys1,
  917. int xr2, int yr2, int xs2, int ys2,
  918. int hwindowsize, int hsearchsize,
  919. int balancetype,
  920. int mwidth );
  921. int im_tbmosaic1( VipsImage *ref, VipsImage *sec, VipsImage *out,
  922. int bandno,
  923. int xr1, int yr1, int xs1, int ys1,
  924. int xr2, int yr2, int xs2, int ys2,
  925. int hwindowsize, int hsearchsize,
  926. int balancetype,
  927. int mwidth );
  928. int im_correl( VipsImage *ref, VipsImage *sec,
  929. int xref, int yref, int xsec, int ysec,
  930. int hwindowsize, int hsearchsize,
  931. double *correlation, int *x, int *y );
  932. int im_align_bands( VipsImage *in, VipsImage *out );
  933. int im_maxpos_subpel( VipsImage *in, double *x, double *y );
  934. VipsImage *vips__deprecated_open_read( const char *filename, gboolean sequential );
  935. VipsImage *vips__deprecated_open_write( const char *filename );
  936. void im__format_init( void );
  937. void im__tiff_register( void );
  938. void im__jpeg_register( void );
  939. void im__png_register( void );
  940. void im__csv_register( void );
  941. void im__ppm_register( void );
  942. void im__analyze_register( void );
  943. void im__exr_register( void );
  944. void im__magick_register( void );
  945. int im__bandup( const char *domain, VipsImage *in, VipsImage *out, int n );
  946. int im__bandalike_vec( const char *domain, VipsImage **in, VipsImage **out, int n );
  947. int im__bandalike( const char *domain,
  948. VipsImage *in1, VipsImage *in2, VipsImage *out1, VipsImage *out2 );
  949. int im__formatalike_vec( VipsImage **in, VipsImage **out, int n );
  950. int im__formatalike( VipsImage *in1, VipsImage *in2, VipsImage *out1, VipsImage *out2 );
  951. typedef int (*im__wrapscan_fn)( void *p, int n, void *seq, void *a, void *b );
  952. int im__wrapscan( VipsImage *in,
  953. VipsStartFn start, im__wrapscan_fn scan, VipsStopFn stop,
  954. void *a, void *b );
  955. int im__colour_difference( const char *domain,
  956. VipsImage *in1, VipsImage *in2, VipsImage *out,
  957. im_wrapmany_fn buffer_fn, void *a, void *b );
  958. int im__colour_unary( const char *domain,
  959. VipsImage *in, VipsImage *out, VipsInterpretation interpretation,
  960. im_wrapone_fn buffer_fn, void *a, void *b );
  961. VipsImage **im__insert_base( const char *domain,
  962. VipsImage *in1, VipsImage *in2, VipsImage *out );
  963. int im__find_lroverlap( VipsImage *ref_in, VipsImage *sec_in, VipsImage *out,
  964. int bandno_in,
  965. int xref, int yref, int xsec, int ysec,
  966. int halfcorrelation, int halfarea,
  967. int *dx0, int *dy0,
  968. double *scale1, double *angle1, double *dx1, double *dy1 );
  969. int im__find_tboverlap( VipsImage *ref_in, VipsImage *sec_in, VipsImage *out,
  970. int bandno_in,
  971. int xref, int yref, int xsec, int ysec,
  972. int halfcorrelation, int halfarea,
  973. int *dx0, int *dy0,
  974. double *scale1, double *angle1, double *dx1, double *dy1 );
  975. int im__find_best_contrast( VipsImage *image,
  976. int xpos, int ypos, int xsize, int ysize,
  977. int xarray[], int yarray[], int cont[],
  978. int nbest, int hcorsize );
  979. int im__balance( VipsImage *ref, VipsImage *sec, VipsImage *out,
  980. VipsImage **ref_out, VipsImage **sec_out, int dx, int dy, int balancetype );
  981. void imb_LCh2Lab( float *, float *, int );
  982. /* A colour temperature.
  983. */
  984. typedef struct {
  985. double X0, Y0, Z0;
  986. } im_colour_temperature;
  987. void imb_XYZ2Lab( float *, float *, int, im_colour_temperature * );
  988. void imb_LabS2Lab( signed short *, float *, int );
  989. void imb_Lab2LabS( float *, signed short *, int n );
  990. void im_copy_dmask_matrix( DOUBLEMASK *mask, double **matrix );
  991. void im_copy_matrix_dmask( double **matrix, DOUBLEMASK *mask );
  992. int *im_ivector(int nl, int nh);
  993. float *im_fvector(int nl, int nh);
  994. double *im_dvector(int nl, int nh);
  995. void im_free_ivector(int *v, int nl, int nh);
  996. void im_free_fvector(float *v, int nl, int nh);
  997. void im_free_dvector(double *v, int nl, int nh);
  998. int **im_imat_alloc(int nrl, int nrh, int ncl, int nch);
  999. void im_free_imat(int **m, int nrl, int nrh, int ncl, int nch);
  1000. float **im_fmat_alloc(int nrl, int nrh, int ncl, int nch);
  1001. void im_free_fmat(float **m, int nrl, int nrh, int ncl, int nch);
  1002. double **im_dmat_alloc(int nrl, int nrh, int ncl, int nch);
  1003. void im_free_dmat(double **m, int nrl, int nrh, int ncl, int nch);
  1004. int im_invmat( double **, int );
  1005. int *im_offsets45( int size );
  1006. int im_conv_f_raw( VipsImage *in, VipsImage *out, DOUBLEMASK *mask );
  1007. int im_convsep_f_raw( VipsImage *in, VipsImage *out, DOUBLEMASK *mask );
  1008. int im_greyc_mask( VipsImage *in, VipsImage *out, VipsImage *mask,
  1009. int iterations, float amplitude, float sharpness, float anisotropy,
  1010. float alpha, float sigma, float dl, float da, float gauss_prec,
  1011. int interpolation, int fast_approx );
  1012. int vips_check_imask( const char *domain, INTMASK *mask );
  1013. int vips_check_dmask( const char *domain, DOUBLEMASK *mask );
  1014. int vips_check_dmask_1d( const char *domain, DOUBLEMASK *mask );
  1015. GOptionGroup *vips_get_option_group( void );
  1016. /* old window manager API
  1017. */
  1018. VipsWindow *vips_window_ref( VipsImage *im, int top, int height );
  1019. /* This stuff is very, very old and should not be used by anyone now.
  1020. */
  1021. #ifdef VIPS_ENABLE_ANCIENT
  1022. #include <vips/deprecated.h>
  1023. #endif /*VIPS_ENABLE_ANCIENT*/
  1024. #include <vips/dispatch.h>
  1025. #include <vips/almostdeprecated.h>
  1026. #ifdef __cplusplus
  1027. }
  1028. #endif /*__cplusplus*/
  1029. #endif /*VIPS_VIPS7COMPAT_H*/