almostdeprecated.h 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. /* Old and broken stuff that we still enable by default, but don't document
  2. * and certainly don't recommend.
  3. *
  4. * 30/6/09
  5. * - from vips.h
  6. */
  7. /*
  8. This file is part of VIPS.
  9. VIPS is free software; you can redistribute it and/or modify
  10. it under the terms of the GNU Lesser General Public License as published by
  11. the Free Software Foundation; either version 2 of the License, or
  12. (at your option) any later version.
  13. This program is distributed in the hope that it will be useful,
  14. but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. GNU Lesser General Public License for more details.
  17. You should have received a copy of the GNU Lesser General Public License
  18. along with this program; if not, write to the Free Software
  19. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  20. 02110-1301 USA
  21. */
  22. /*
  23. These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
  24. */
  25. #ifndef IM_ALMOSTDEPRECATED_H
  26. #define IM_ALMOSTDEPRECATED_H
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif /*__cplusplus*/
  30. /* Was public, now deprecated.
  31. */
  32. typedef enum {
  33. IM_BBITS_BYTE = 8,
  34. IM_BBITS_SHORT = 16,
  35. IM_BBITS_INT = 32,
  36. IM_BBITS_FLOAT = 32,
  37. IM_BBITS_COMPLEX = 64,
  38. IM_BBITS_DOUBLE = 64,
  39. IM_BBITS_DPCOMPLEX = 128
  40. } VipsBBits;
  41. /* Used to define a region of interest for im_extract() etc. Too boring to be
  42. * public API, see im_extract_area() etc.
  43. */
  44. typedef struct {
  45. int xstart;
  46. int ystart;
  47. int xsize;
  48. int ysize;
  49. int chsel; /* 1 2 3 or 0, for r g b or all respectively
  50. *(channel select) */
  51. } IMAGE_BOX;
  52. int im_extract( IMAGE *, IMAGE *, IMAGE_BOX * );
  53. DOUBLEMASK *im_measure( IMAGE *im, IMAGE_BOX *box, int h, int v,
  54. int *sel, int nsel, const char *name );
  55. gboolean im_isuint( IMAGE *im );
  56. gboolean im_isint( IMAGE *im );
  57. gboolean im_isfloat( IMAGE *im );
  58. gboolean im_isscalar( IMAGE *im );
  59. gboolean im_iscomplex( IMAGE *im );
  60. int im_c2ps( IMAGE *in, IMAGE *out );
  61. int im_clip( IMAGE *in, IMAGE *out );
  62. #define MASK_IDEAL_HIGHPASS IM_MASK_IDEAL_HIGHPASS
  63. #define MASK_IDEAL_LOWPASS IM_MASK_IDEAL_LOWPASS
  64. #define MASK_BUTTERWORTH_HIGHPASS IM_MASK_BUTTERWORTH_HIGHPASS
  65. #define MASK_BUTTERWORTH_LOWPASS IM_MASK_BUTTERWORTH_LOWPASS
  66. #define MASK_GAUSS_HIGHPASS IM_MASK_GAUSS_HIGHPASS
  67. #define MASK_GAUSS_LOWPASS IM_MASK_GAUSS_LOWPASS
  68. #define MASK_IDEAL_RINGPASS IM_MASK_IDEAL_RINGPASS
  69. #define MASK_IDEAL_RINGREJECT IM_MASK_IDEAL_RINGREJECT
  70. #define MASK_BUTTERWORTH_RINGPASS IM_MASK_BUTTERWORTH_RINGPASS
  71. #define MASK_BUTTERWORTH_RINGREJECT IM_MASK_BUTTERWORTH_RINGREJECT
  72. #define MASK_GAUSS_RINGPASS IM_MASK_GAUSS_RINGPASS
  73. #define MASK_GAUSS_RINGREJECT IM_MASK_GAUSS_RINGREJECT
  74. #define MASK_IDEAL_BANDPASS IM_MASK_IDEAL_BANDPASS
  75. #define MASK_IDEAL_BANDREJECT IM_MASK_IDEAL_BANDREJECT
  76. #define MASK_BUTTERWORTH_BANDPASS IM_MASK_BUTTERWORTH_BANDPASS
  77. #define MASK_BUTTERWORTH_BANDREJECT IM_MASK_BUTTERWORTH_BANDREJECT
  78. #define MASK_GAUSS_BANDPASS IM_MASK_GAUSS_BANDPASS
  79. #define MASK_GAUSS_BANDREJECT IM_MASK_GAUSS_BANDREJECT
  80. #define MASK_FRACTAL_FLT IM_MASK_FRACTAL_FLT
  81. #define MaskType ImMaskType
  82. /* Copy and swap types.
  83. */
  84. typedef enum {
  85. IM_ARCH_NATIVE,
  86. IM_ARCH_BYTE_SWAPPED,
  87. IM_ARCH_LSB_FIRST,
  88. IM_ARCH_MSB_FIRST
  89. } im_arch_type;
  90. gboolean im_isnative( im_arch_type arch );
  91. int im_copy_from( IMAGE *in, IMAGE *out, im_arch_type architecture );
  92. /* Backwards compatibility macros.
  93. */
  94. #define im_clear_error_string() im_error_clear()
  95. #define im_errorstring() im_error_buffer()
  96. /* Deprecated API.
  97. */
  98. void im_errormsg( const char *fmt, ... )
  99. __attribute__((format(printf, 1, 2)));
  100. void im_verrormsg( const char *fmt, va_list ap );
  101. void im_errormsg_system( int err, const char *fmt, ... )
  102. __attribute__((format(printf, 2, 3)));
  103. void im_diagnostics( const char *fmt, ... )
  104. __attribute__((format(printf, 1, 2)));
  105. void im_warning( const char *fmt, ... )
  106. __attribute__((format(printf, 1, 2)));
  107. int im_iterate( VipsImage *im,
  108. VipsStartFn start, im_generate_fn generate, VipsStopFn stop,
  109. void *a, void *b
  110. );
  111. /* Async rendering.
  112. */
  113. int im_render_priority( VipsImage *in, VipsImage *out, VipsImage *mask,
  114. int width, int height, int max,
  115. int priority,
  116. void (*notify)( VipsImage *, VipsRect *, void * ), void *client );
  117. int im_cache( VipsImage *in, VipsImage *out, int width, int height, int max );
  118. /* Deprecated operations.
  119. */
  120. int im_cmulnorm( IMAGE *in1, IMAGE *in2, IMAGE *out );
  121. int im_fav4( IMAGE **, IMAGE * );
  122. int im_gadd( double, IMAGE *, double, IMAGE *, double, IMAGE *);
  123. int im_litecor( IMAGE *, IMAGE *, IMAGE *, int, double );
  124. int im_render_fade( IMAGE *in, IMAGE *out, IMAGE *mask,
  125. int width, int height, int max,
  126. int fps, int steps,
  127. int priority,
  128. void (*notify)( IMAGE *, VipsRect *, void * ), void *client );
  129. int im_render( IMAGE *in, IMAGE *out, IMAGE *mask,
  130. int width, int height, int max,
  131. void (*notify)( IMAGE *, VipsRect *, void * ), void *client );
  132. int im_cooc_matrix( IMAGE *im, IMAGE *m,
  133. int xp, int yp, int xs, int ys, int dx, int dy, int flag );
  134. int im_cooc_asm( IMAGE *m, double *asmoment );
  135. int im_cooc_contrast( IMAGE *m, double *contrast );
  136. int im_cooc_correlation( IMAGE *m, double *correlation );
  137. int im_cooc_entropy( IMAGE *m, double *entropy );
  138. int im_glds_matrix( IMAGE *im, IMAGE *m,
  139. int xpos, int ypos, int xsize, int ysize, int dx, int dy );
  140. int im_glds_asm( IMAGE *m, double *asmoment );
  141. int im_glds_contrast( IMAGE *m, double *contrast );
  142. int im_glds_entropy( IMAGE *m, double *entropy );
  143. int im_glds_mean( IMAGE *m, double *mean );
  144. int im_dif_std(IMAGE *im, int xpos, int ypos, int xsize, int ysize, int dx, int dy, double *pmean, double *pstd);
  145. int im_simcontr( IMAGE *out, int xsize, int ysize );
  146. int im_spatres( IMAGE *in, IMAGE *out, int step );
  147. int im_stretch3( IMAGE *in, IMAGE *out, double dx, double dy );
  148. /* Renamed operations.
  149. */
  150. /* arithmetic
  151. */
  152. int im_remainderconst_vec( IMAGE *in, IMAGE *out, int n, double *c );
  153. /* boolean
  154. */
  155. int im_andconst( IMAGE *, IMAGE *, double );
  156. int im_and_vec( IMAGE *, IMAGE *, int, double * );
  157. int im_orconst( IMAGE *, IMAGE *, double );
  158. int im_or_vec( IMAGE *, IMAGE *, int, double * );
  159. int im_eorconst( IMAGE *, IMAGE *, double );
  160. int im_eor_vec( IMAGE *, IMAGE *, int, double * );
  161. /* mosaicing
  162. */
  163. int im_affine( IMAGE *in, IMAGE *out,
  164. double a, double b, double c, double d, double dx, double dy,
  165. int ox, int oy, int ow, int oh );
  166. int im_similarity( IMAGE *in, IMAGE *out,
  167. double a, double b, double dx, double dy );
  168. int im_similarity_area( IMAGE *in, IMAGE *out,
  169. double a, double b, double dx, double dy,
  170. int ox, int oy, int ow, int oh );
  171. /* colour
  172. */
  173. int im_icc_export( IMAGE *in, IMAGE *out,
  174. const char *output_profile_filename, int intent );
  175. /* conversion
  176. */
  177. int im_clip2dcm( IMAGE *in, IMAGE *out );
  178. int im_clip2cm( IMAGE *in, IMAGE *out );
  179. int im_clip2us( IMAGE *in, IMAGE *out );
  180. int im_clip2ui( IMAGE *in, IMAGE *out );
  181. int im_clip2s( IMAGE *in, IMAGE *out );
  182. int im_clip2i( IMAGE *in, IMAGE *out );
  183. int im_clip2d( IMAGE *in, IMAGE *out );
  184. int im_clip2f( IMAGE *in, IMAGE *out );
  185. int im_clip2c( IMAGE *in, IMAGE *out );
  186. int im_slice( IMAGE *in, IMAGE *out, double, double );
  187. int im_thresh( IMAGE *in, IMAGE *out, double );
  188. int im_print( const char *message );
  189. int im_convsub( IMAGE *in, IMAGE *out, INTMASK *mask, int xskip, int yskip );
  190. int im_bernd( const char *tiffname, int x, int y, int w, int h );
  191. int im_resize_linear( IMAGE *, IMAGE *, int, int );
  192. int im_convf( IMAGE *in, IMAGE *out, DOUBLEMASK *mask );
  193. int im_convsepf( IMAGE *in, IMAGE *out, DOUBLEMASK *mask );
  194. int im_conv_raw( IMAGE *in, IMAGE *out, INTMASK *mask );
  195. int im_convf_raw( IMAGE *in, IMAGE *out, DOUBLEMASK *mask );
  196. int im_convsep_raw( IMAGE *in, IMAGE *out, INTMASK *mask );
  197. int im_convsepf_raw( IMAGE *in, IMAGE *out, DOUBLEMASK *mask );
  198. int im_fastcor_raw( IMAGE *in, IMAGE *ref, IMAGE *out );
  199. int im_spcor_raw( IMAGE *in, IMAGE *ref, IMAGE *out );
  200. int im_gradcor_raw( IMAGE *in, IMAGE *ref, IMAGE *out );
  201. int im_contrast_surface_raw( IMAGE *in, IMAGE *out,
  202. int half_win_size, int spacing );
  203. int im_stdif_raw( IMAGE *in, IMAGE *out,
  204. double a, double m0, double b, double s0, int xwin, int ywin );
  205. int im_lhisteq_raw( IMAGE *in, IMAGE *out, int xwin, int ywin );
  206. int im_erode_raw( IMAGE *in, IMAGE *out, INTMASK *m );
  207. int im_dilate_raw( IMAGE *in, IMAGE *out, INTMASK *m );
  208. int im_rank_raw( IMAGE *in, IMAGE *out, int xsize, int ysize, int order );
  209. /* inplace
  210. */
  211. int im_circle( IMAGE *im, int cx, int cy, int radius, int intensity );
  212. int im_line( IMAGE *, int, int, int, int, int );
  213. int im_segment( IMAGE *test, IMAGE *mask, int *segments );
  214. int im_paintrect( IMAGE *im, VipsRect *r, PEL *ink );
  215. int im_insertplace( IMAGE *main, IMAGE *sub, int x, int y );
  216. int im_flood_copy( IMAGE *in, IMAGE *out, int x, int y, PEL *ink );
  217. int im_flood_blob_copy( IMAGE *in, IMAGE *out, int x, int y, PEL *ink );
  218. int im_flood_other_copy( IMAGE *test, IMAGE *mark, IMAGE *out,
  219. int x, int y, int serial );
  220. int im_flood( IMAGE *im, int x, int y, PEL *ink, VipsRect *dout );
  221. int im_flood_blob( IMAGE *im, int x, int y, PEL *ink, VipsRect *dout );
  222. int im_flood_other( IMAGE *test, IMAGE *mark,
  223. int x, int y, int serial, VipsRect *dout );
  224. int im_fastline( IMAGE *im, int x1, int y1, int x2, int y2, PEL *pel );
  225. int im_fastlineuser( IMAGE *im,
  226. int x1, int y1, int x2, int y2,
  227. VipsPlotFn fn, void *client1, void *client2, void *client3 );
  228. int im_plotmask( IMAGE *im, int ix, int iy, PEL *ink, PEL *mask, VipsRect *r );
  229. int im_readpoint( IMAGE *im, int x, int y, PEL *pel );
  230. int im_plotpoint( IMAGE *im, int x, int y, PEL *pel );
  231. int im_smudge( IMAGE *image, int ix, int iy, VipsRect *r );
  232. int im_smear( IMAGE *im, int ix, int iy, VipsRect *r );
  233. void vips_warn( const char *domain, const char *fmt, ... )
  234. __attribute__((format(printf, 2, 3)));
  235. void vips_vwarn( const char *domain, const char *fmt, va_list ap );
  236. void vips_info_set( gboolean info );
  237. void vips_info( const char *domain, const char *fmt, ... )
  238. __attribute__((format(printf, 2, 3)));
  239. void vips_vinfo( const char *domain, const char *fmt, va_list ap );
  240. #ifdef __cplusplus
  241. }
  242. #endif /*__cplusplus*/
  243. #endif /*IM_ALMOSTDEPRECATED_H*/