diff --git a/ChangeLog b/ChangeLog index 500cbb77..10ea866a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,7 @@ - tiffload, pdfload, magickload set VIPS_META_N_PAGES "n-pages" metadata item - add fontfile option to vips_text() [fangqiao] - add vips_transpose3d() -- swap major dimensions in a volumetric image +- remove vips7 stuff from default API ... you must now #include it explicitly 12/3/18 started 8.6.4 - better fitting of fonts with overhanging edges [AdriĆ ] diff --git a/configure.ac b/configure.ac index 67507c02..1a74e303 100644 --- a/configure.ac +++ b/configure.ac @@ -1278,7 +1278,6 @@ AC_OUTPUT([ libvips/mosaicing/Makefile libvips/create/Makefile libvips/resample/Makefile - libvips/video/Makefile libvipsCC/include/Makefile libvipsCC/include/vips/Makefile libvipsCC/Makefile diff --git a/libvips/Makefile.am b/libvips/Makefile.am index 6ec81508..eab47939 100644 --- a/libvips/Makefile.am +++ b/libvips/Makefile.am @@ -24,8 +24,7 @@ SUBDIRS = \ iofuncs \ morphology \ mosaicing \ - create \ - video \ + create . lib_LTLIBRARIES = libvips.la @@ -52,7 +51,6 @@ libvips_la_LIBADD = \ morphology/libmorphology.la \ mosaicing/libmosaicing.la \ create/libcreate.la \ - video/libvideo.la \ @VIPS_LIBS@ libvips_la_LDFLAGS = \ diff --git a/libvips/arithmetic/stats.c b/libvips/arithmetic/stats.c index 81909b0d..1f3b0c2b 100644 --- a/libvips/arithmetic/stats.c +++ b/libvips/arithmetic/stats.c @@ -409,7 +409,7 @@ vips_stats_class_init( VipsStatsClass *class ) gobject_class->get_property = vips_object_get_property; object_class->nickname = "stats"; - object_class->description = _( "find image average" ); + object_class->description = _( "find many image stats" ); object_class->build = vips_stats_build; sclass->start = vips_stats_start; diff --git a/libvips/convolution/convasep.c b/libvips/convolution/convasep.c index 08e7b468..dc09e2c4 100644 --- a/libvips/convolution/convasep.c +++ b/libvips/convolution/convasep.c @@ -372,7 +372,7 @@ vips_convasep_stop( void *vseq, void *a, void *b ) static void * vips_convasep_start( VipsImage *out, void *a, void *b ) { - VipsImage *in = (IMAGE *) a; + VipsImage *in = (VipsImage *) a; VipsConvasep *convasep = (VipsConvasep *) b; VipsConvasepSeq *seq; diff --git a/libvips/convolution/convf.c b/libvips/convolution/convf.c index d6217906..e9952f02 100644 --- a/libvips/convolution/convf.c +++ b/libvips/convolution/convf.c @@ -176,7 +176,7 @@ vips_convf_start( VipsImage *out, void *a, void *b ) /* Convolve! */ static int -vips_convf_gen( REGION *or, void *vseq, void *a, void *b, gboolean *stop ) +vips_convf_gen( VipsRegion *or, void *vseq, void *a, void *b, gboolean *stop ) { VipsConvfSequence *seq = (VipsConvfSequence *) vseq; VipsConvf *convf = (VipsConvf *) b; @@ -337,8 +337,8 @@ vips_convf_build( VipsObject *object ) /* Prepare output. Consider a 7x7 mask and a 7x7 image --- the output * would be 1x1. */ - if( vips_bandfmt_isint( in->BandFmt ) ) - convolution->out->BandFmt = IM_BANDFMT_FLOAT; + if( vips_band_format_isint( in->BandFmt ) ) + convolution->out->BandFmt = VIPS_FORMAT_FLOAT; convolution->out->Xsize -= M->Xsize - 1; convolution->out->Ysize -= M->Ysize - 1; diff --git a/libvips/deprecated/Makefile.am b/libvips/deprecated/Makefile.am index 17ed77e6..bbc93424 100644 --- a/libvips/deprecated/Makefile.am +++ b/libvips/deprecated/Makefile.am @@ -1,6 +1,8 @@ noinst_LTLIBRARIES = libdeprecated.la libdeprecated_la_SOURCES = \ + video_dispatch.c \ + im_video_test.c \ cimg_dispatch.c \ inplace_dispatch.c \ tone.c \ diff --git a/libvips/deprecated/arith_dispatch.c b/libvips/deprecated/arith_dispatch.c index 3332781d..b855080f 100644 --- a/libvips/deprecated/arith_dispatch.c +++ b/libvips/deprecated/arith_dispatch.c @@ -38,6 +38,7 @@ #include #include +#include /* One image in, one out. */ diff --git a/libvips/deprecated/cimg_dispatch.c b/libvips/deprecated/cimg_dispatch.c index e7107db8..54ac9b88 100644 --- a/libvips/deprecated/cimg_dispatch.c +++ b/libvips/deprecated/cimg_dispatch.c @@ -36,6 +36,7 @@ #include #include +#include static int greyc_vec( im_object *argv ) diff --git a/libvips/deprecated/colour_dispatch.c b/libvips/deprecated/colour_dispatch.c index dd92f3e8..b8e5f432 100644 --- a/libvips/deprecated/colour_dispatch.c +++ b/libvips/deprecated/colour_dispatch.c @@ -38,6 +38,7 @@ #include #include +#include /* One image in, one out. */ diff --git a/libvips/deprecated/conver_dispatch.c b/libvips/deprecated/conver_dispatch.c index c0483cfb..8778c610 100644 --- a/libvips/deprecated/conver_dispatch.c +++ b/libvips/deprecated/conver_dispatch.c @@ -36,6 +36,7 @@ #include #include +#include static int system_vec( im_object *argv ) diff --git a/libvips/deprecated/convol_dispatch.c b/libvips/deprecated/convol_dispatch.c index e3b50029..65913e35 100644 --- a/libvips/deprecated/convol_dispatch.c +++ b/libvips/deprecated/convol_dispatch.c @@ -38,6 +38,7 @@ #include #include +#include /* One image in, one out. */ diff --git a/libvips/deprecated/cooc_funcs.c b/libvips/deprecated/cooc_funcs.c index 29b6c8e7..948bab4c 100644 --- a/libvips/deprecated/cooc_funcs.c +++ b/libvips/deprecated/cooc_funcs.c @@ -75,6 +75,7 @@ #include #include +#include static int im_cooc_sym(IMAGE *im, IMAGE *m, int xpos, int ypos, int xsize, int ysize, int dx, int dy) diff --git a/libvips/deprecated/deprecated_dispatch.c b/libvips/deprecated/deprecated_dispatch.c index c6a03b8a..c8c4aeeb 100644 --- a/libvips/deprecated/deprecated_dispatch.c +++ b/libvips/deprecated/deprecated_dispatch.c @@ -36,6 +36,7 @@ #include #include +#include #include /* One image in, one out. diff --git a/libvips/deprecated/dispatch_types.c b/libvips/deprecated/dispatch_types.c index 66dc73e2..fe52a549 100644 --- a/libvips/deprecated/dispatch_types.c +++ b/libvips/deprecated/dispatch_types.c @@ -47,6 +47,7 @@ #include #include +#include #include /* String containing each of the characters which can be used within a diff --git a/libvips/deprecated/fits.c b/libvips/deprecated/fits.c index f45e031d..e74955ab 100644 --- a/libvips/deprecated/fits.c +++ b/libvips/deprecated/fits.c @@ -41,6 +41,7 @@ #include #include +#include #include #include diff --git a/libvips/deprecated/format.c b/libvips/deprecated/format.c index fea88a73..edeb25d5 100644 --- a/libvips/deprecated/format.c +++ b/libvips/deprecated/format.c @@ -36,6 +36,7 @@ #include #include +#include #include /* To iterate over supported formats, we build a temp list of subclasses of diff --git a/libvips/deprecated/format_dispatch.c b/libvips/deprecated/format_dispatch.c index 40e9143f..25eea9f8 100644 --- a/libvips/deprecated/format_dispatch.c +++ b/libvips/deprecated/format_dispatch.c @@ -36,6 +36,7 @@ #include #include +#include static int jpeg2vips_vec( im_object *argv ) diff --git a/libvips/deprecated/freq_dispatch.c b/libvips/deprecated/freq_dispatch.c index 39c39ae1..8ac2fa1a 100644 --- a/libvips/deprecated/freq_dispatch.c +++ b/libvips/deprecated/freq_dispatch.c @@ -41,6 +41,7 @@ #include #include +#include /* One image in, one out. */ diff --git a/libvips/deprecated/glds_funcs.c b/libvips/deprecated/glds_funcs.c index 46224a16..e63369c5 100644 --- a/libvips/deprecated/glds_funcs.c +++ b/libvips/deprecated/glds_funcs.c @@ -72,6 +72,7 @@ #include #include +#include /* Keep the greylevel difference matrix as a 256x1 double image */ diff --git a/libvips/deprecated/hist_dispatch.c b/libvips/deprecated/hist_dispatch.c index aeb8f461..b6e30c72 100644 --- a/libvips/deprecated/hist_dispatch.c +++ b/libvips/deprecated/hist_dispatch.c @@ -38,6 +38,7 @@ #include #include +#include /* One image in, one out. */ diff --git a/libvips/deprecated/im_align_bands.c b/libvips/deprecated/im_align_bands.c index 603d0434..020ba6ef 100644 --- a/libvips/deprecated/im_align_bands.c +++ b/libvips/deprecated/im_align_bands.c @@ -39,6 +39,7 @@ #include #include +#include /** * im_align_bands: diff --git a/libvips/deprecated/im_analyze2vips.c b/libvips/deprecated/im_analyze2vips.c index c7b63056..6269b51c 100644 --- a/libvips/deprecated/im_analyze2vips.c +++ b/libvips/deprecated/im_analyze2vips.c @@ -41,6 +41,7 @@ #include #include +#include static VipsFormatFlags analyze_flags( const char *filename ) diff --git a/libvips/deprecated/im_benchmark.c b/libvips/deprecated/im_benchmark.c index 900e087c..fcfb85ba 100644 --- a/libvips/deprecated/im_benchmark.c +++ b/libvips/deprecated/im_benchmark.c @@ -45,6 +45,7 @@ #include #include +#include /* diff --git a/libvips/deprecated/im_bernd.c b/libvips/deprecated/im_bernd.c index fe176c00..6575b97a 100644 --- a/libvips/deprecated/im_bernd.c +++ b/libvips/deprecated/im_bernd.c @@ -52,6 +52,7 @@ #include #include +#include static int extract( IMAGE *in, int x, int y, int w, int h ) diff --git a/libvips/deprecated/im_clamp.c b/libvips/deprecated/im_clamp.c index cd37ff55..859ec132 100644 --- a/libvips/deprecated/im_clamp.c +++ b/libvips/deprecated/im_clamp.c @@ -48,6 +48,7 @@ #include #include +#include #include int diff --git a/libvips/deprecated/im_cmulnorm.c b/libvips/deprecated/im_cmulnorm.c index 8f37e785..cfd29eae 100644 --- a/libvips/deprecated/im_cmulnorm.c +++ b/libvips/deprecated/im_cmulnorm.c @@ -47,6 +47,7 @@ #include #include +#include #include #include diff --git a/libvips/deprecated/im_convsub.c b/libvips/deprecated/im_convsub.c index 542a99c0..d85f4198 100644 --- a/libvips/deprecated/im_convsub.c +++ b/libvips/deprecated/im_convsub.c @@ -55,6 +55,7 @@ #include #include +#include #include /* Create multiplication luts for all non zero elements of the original mask; diff --git a/libvips/deprecated/im_csv2vips.c b/libvips/deprecated/im_csv2vips.c index a2bf48e0..e4e5a860 100644 --- a/libvips/deprecated/im_csv2vips.c +++ b/libvips/deprecated/im_csv2vips.c @@ -43,6 +43,7 @@ #include #include +#include #include "../foreign/pforeign.h" diff --git a/libvips/deprecated/im_debugim.c b/libvips/deprecated/im_debugim.c index 966996e8..688b2619 100644 --- a/libvips/deprecated/im_debugim.c +++ b/libvips/deprecated/im_debugim.c @@ -57,6 +57,7 @@ #include #include +#include int im_debugim( IMAGE *in ) diff --git a/libvips/deprecated/im_dif_std.c b/libvips/deprecated/im_dif_std.c index 2dcaf9de..83d61b03 100644 --- a/libvips/deprecated/im_dif_std.c +++ b/libvips/deprecated/im_dif_std.c @@ -45,6 +45,7 @@ #include #include +#include #include static int diff --git a/libvips/deprecated/im_exr2vips.c b/libvips/deprecated/im_exr2vips.c index 3996bf52..0a4fd7a6 100644 --- a/libvips/deprecated/im_exr2vips.c +++ b/libvips/deprecated/im_exr2vips.c @@ -46,6 +46,7 @@ #include #include +#include #include #include diff --git a/libvips/deprecated/im_fav4.c b/libvips/deprecated/im_fav4.c index 10a8d7c1..a36ee859 100644 --- a/libvips/deprecated/im_fav4.c +++ b/libvips/deprecated/im_fav4.c @@ -38,6 +38,7 @@ Copyright (C) 1992, Kirk Martinez, History of Art Dept, Birkbeck College #include #include +#include #define ARGS "fav4: frame average 4 frames\nARGS: im1 im2 im3 im4 outfile" #define NFRAMES 4 diff --git a/libvips/deprecated/im_freq_mask.c b/libvips/deprecated/im_freq_mask.c index 129eefff..289c7295 100644 --- a/libvips/deprecated/im_freq_mask.c +++ b/libvips/deprecated/im_freq_mask.c @@ -46,6 +46,7 @@ #include #include +#include #include /* Make a mask image. diff --git a/libvips/deprecated/im_gadd.c b/libvips/deprecated/im_gadd.c index bc25ade0..03861dc1 100644 --- a/libvips/deprecated/im_gadd.c +++ b/libvips/deprecated/im_gadd.c @@ -57,6 +57,7 @@ #include #include +#include int im_gfadd(double a, IMAGE *in1, double b, IMAGE *in2, double c, IMAGE *out); int im_gaddim(double a, IMAGE *in1, double b, IMAGE *in2, double c, IMAGE *out); diff --git a/libvips/deprecated/im_gaddim.c b/libvips/deprecated/im_gaddim.c index de5495b6..1a9ffe7a 100644 --- a/libvips/deprecated/im_gaddim.c +++ b/libvips/deprecated/im_gaddim.c @@ -58,6 +58,7 @@ #include #include +#include /* This function works on either mmaped files or on images in buffer */ diff --git a/libvips/deprecated/im_gfadd.c b/libvips/deprecated/im_gfadd.c index 61c88f84..77e3e854 100644 --- a/libvips/deprecated/im_gfadd.c +++ b/libvips/deprecated/im_gfadd.c @@ -61,6 +61,7 @@ #include #include +#include /* uchar char ushort short uint int float double */ static int array[8][8] = { diff --git a/libvips/deprecated/im_gradcor.c b/libvips/deprecated/im_gradcor.c index d05dc920..325ae359 100644 --- a/libvips/deprecated/im_gradcor.c +++ b/libvips/deprecated/im_gradcor.c @@ -47,6 +47,7 @@ #include #include +#include /** LOCAL TYPES **/ diff --git a/libvips/deprecated/im_jpeg2vips.c b/libvips/deprecated/im_jpeg2vips.c index 11696663..8b00fd79 100644 --- a/libvips/deprecated/im_jpeg2vips.c +++ b/libvips/deprecated/im_jpeg2vips.c @@ -47,6 +47,7 @@ #include #include +#include #include "../foreign/pforeign.h" diff --git a/libvips/deprecated/im_lab_morph.c b/libvips/deprecated/im_lab_morph.c index 2c021aa7..9dfc7477 100644 --- a/libvips/deprecated/im_lab_morph.c +++ b/libvips/deprecated/im_lab_morph.c @@ -45,6 +45,7 @@ #include #include +#include #include int diff --git a/libvips/deprecated/im_line.c b/libvips/deprecated/im_line.c index 2d375038..a06774b4 100644 --- a/libvips/deprecated/im_line.c +++ b/libvips/deprecated/im_line.c @@ -52,6 +52,7 @@ #include #include +#include int im_line(image, x1, y1, x2, y2, pelval) IMAGE *image; diff --git a/libvips/deprecated/im_linreg.c b/libvips/deprecated/im_linreg.c index f773d33f..d4263846 100644 --- a/libvips/deprecated/im_linreg.c +++ b/libvips/deprecated/im_linreg.c @@ -50,6 +50,7 @@ #include #include #include +#include /** TYPES **/ diff --git a/libvips/deprecated/im_litecor.c b/libvips/deprecated/im_litecor.c index b1696596..9d631525 100644 --- a/libvips/deprecated/im_litecor.c +++ b/libvips/deprecated/im_litecor.c @@ -66,6 +66,7 @@ #include #include +#include /* If maximum output is > 255 scale output between minout and maxout, * by normalising maxout to 255. diff --git a/libvips/deprecated/im_magick2vips.c b/libvips/deprecated/im_magick2vips.c index 2858cc7e..c54217d1 100644 --- a/libvips/deprecated/im_magick2vips.c +++ b/libvips/deprecated/im_magick2vips.c @@ -41,6 +41,7 @@ #include #include +#include #include "../foreign/pforeign.h" diff --git a/libvips/deprecated/im_mask2vips.c b/libvips/deprecated/im_mask2vips.c index 918402fe..ff9ea59f 100644 --- a/libvips/deprecated/im_mask2vips.c +++ b/libvips/deprecated/im_mask2vips.c @@ -45,6 +45,7 @@ #include #include +#include /** * im_mask2vips: diff --git a/libvips/deprecated/im_matcat.c b/libvips/deprecated/im_matcat.c index 5477994b..ef13d4b4 100644 --- a/libvips/deprecated/im_matcat.c +++ b/libvips/deprecated/im_matcat.c @@ -42,6 +42,7 @@ #include #include +#include /** * im_matcat: diff --git a/libvips/deprecated/im_matinv.c b/libvips/deprecated/im_matinv.c index 7f3d7f65..79271efa 100644 --- a/libvips/deprecated/im_matinv.c +++ b/libvips/deprecated/im_matinv.c @@ -54,6 +54,7 @@ #include #include #include +#include /** CONSTANTS **/ diff --git a/libvips/deprecated/im_matmul.c b/libvips/deprecated/im_matmul.c index dbbfd8da..17d332a7 100644 --- a/libvips/deprecated/im_matmul.c +++ b/libvips/deprecated/im_matmul.c @@ -41,6 +41,7 @@ #include #include +#include /** * im_matmul: diff --git a/libvips/deprecated/im_mattrn.c b/libvips/deprecated/im_mattrn.c index b7766b28..581e155c 100644 --- a/libvips/deprecated/im_mattrn.c +++ b/libvips/deprecated/im_mattrn.c @@ -39,6 +39,7 @@ #include #include +#include /** * im_mattrn: diff --git a/libvips/deprecated/im_maxpos_avg.c b/libvips/deprecated/im_maxpos_avg.c index f59f9014..dc9bbea3 100644 --- a/libvips/deprecated/im_maxpos_avg.c +++ b/libvips/deprecated/im_maxpos_avg.c @@ -62,6 +62,7 @@ #include #include +#include #include /* A position and maximum. diff --git a/libvips/deprecated/im_maxpos_subpel.c b/libvips/deprecated/im_maxpos_subpel.c index 8b291d40..5182a18c 100644 --- a/libvips/deprecated/im_maxpos_subpel.c +++ b/libvips/deprecated/im_maxpos_subpel.c @@ -42,6 +42,7 @@ #include #include +#include #define MOST_OF( A, B ) ( (A) > 0.9 * (B) ) diff --git a/libvips/deprecated/im_measure.c b/libvips/deprecated/im_measure.c index d0b48225..fd08ba4c 100644 --- a/libvips/deprecated/im_measure.c +++ b/libvips/deprecated/im_measure.c @@ -60,6 +60,7 @@ #include #include +#include /* Measure into array. */ diff --git a/libvips/deprecated/im_openslide2vips.c b/libvips/deprecated/im_openslide2vips.c index 105ea762..f86a5788 100644 --- a/libvips/deprecated/im_openslide2vips.c +++ b/libvips/deprecated/im_openslide2vips.c @@ -50,6 +50,7 @@ #include #include +#include #include #include diff --git a/libvips/deprecated/im_png2vips.c b/libvips/deprecated/im_png2vips.c index a1b24579..6f7d87b8 100644 --- a/libvips/deprecated/im_png2vips.c +++ b/libvips/deprecated/im_png2vips.c @@ -43,6 +43,7 @@ #include #include +#include #include #include "../foreign/pforeign.h" diff --git a/libvips/deprecated/im_point_bilinear.c b/libvips/deprecated/im_point_bilinear.c index db5b91a9..7318efb1 100644 --- a/libvips/deprecated/im_point_bilinear.c +++ b/libvips/deprecated/im_point_bilinear.c @@ -45,6 +45,7 @@ #include #include +#include /** * im_point: diff --git a/libvips/deprecated/im_ppm2vips.c b/libvips/deprecated/im_ppm2vips.c index 1108223c..d8ad9602 100644 --- a/libvips/deprecated/im_ppm2vips.c +++ b/libvips/deprecated/im_ppm2vips.c @@ -37,6 +37,7 @@ #include #include +#include int im_ppm2vips( const char *filename, IMAGE *out ) diff --git a/libvips/deprecated/im_print.c b/libvips/deprecated/im_print.c index 4b214367..1b5fce5d 100644 --- a/libvips/deprecated/im_print.c +++ b/libvips/deprecated/im_print.c @@ -36,6 +36,7 @@ #include #include +#include /* Print a string to stdout, with a "\n". Sometimes useful for debugging * language bindings. diff --git a/libvips/deprecated/im_printlines.c b/libvips/deprecated/im_printlines.c index f7fee49b..fbb21959 100644 --- a/libvips/deprecated/im_printlines.c +++ b/libvips/deprecated/im_printlines.c @@ -54,6 +54,7 @@ #include #include +#include /* Useful: Call a macro with the name, type pairs for all VIPS functions. */ diff --git a/libvips/deprecated/im_resize_linear.c b/libvips/deprecated/im_resize_linear.c index 75920bc7..92d490f8 100644 --- a/libvips/deprecated/im_resize_linear.c +++ b/libvips/deprecated/im_resize_linear.c @@ -48,6 +48,7 @@ #include #include +#include /* What we do for each pel. */ diff --git a/libvips/deprecated/im_setbox.c b/libvips/deprecated/im_setbox.c index b80639a8..7d037d02 100644 --- a/libvips/deprecated/im_setbox.c +++ b/libvips/deprecated/im_setbox.c @@ -48,6 +48,7 @@ #include #include +#include void im_setbox(IMAGE_BOX *pbox, int xst, int yst, int xsiz, int ysiz, int ch_select) { diff --git a/libvips/deprecated/im_simcontr.c b/libvips/deprecated/im_simcontr.c index 60dad6b2..d9b2c14f 100644 --- a/libvips/deprecated/im_simcontr.c +++ b/libvips/deprecated/im_simcontr.c @@ -49,6 +49,7 @@ #include #include +#include /** * im_simcontr: diff --git a/libvips/deprecated/im_slice.c b/libvips/deprecated/im_slice.c index 9dcd3d9c..1b3f8038 100644 --- a/libvips/deprecated/im_slice.c +++ b/libvips/deprecated/im_slice.c @@ -55,6 +55,7 @@ #include #include +#include #define BRIGHT 255 #define GREY 128 diff --git a/libvips/deprecated/im_spatres.c b/libvips/deprecated/im_spatres.c index 9359e880..39fb9b86 100644 --- a/libvips/deprecated/im_spatres.c +++ b/libvips/deprecated/im_spatres.c @@ -52,6 +52,7 @@ #include #include +#include int im_spatres( IMAGE *in, IMAGE *out, int step ) diff --git a/libvips/deprecated/im_stretch3.c b/libvips/deprecated/im_stretch3.c index ab1c49b8..38d65ebb 100644 --- a/libvips/deprecated/im_stretch3.c +++ b/libvips/deprecated/im_stretch3.c @@ -62,6 +62,7 @@ #include #include +#include /* Data for the cubic interpolation function. */ diff --git a/libvips/deprecated/im_thresh.c b/libvips/deprecated/im_thresh.c index 99c904e7..3eddd774 100644 --- a/libvips/deprecated/im_thresh.c +++ b/libvips/deprecated/im_thresh.c @@ -51,6 +51,7 @@ #include #include +#include /* Useful: Call a macro with the name, type pairs for all VIPS functions. */ #define BRIGHT 255 diff --git a/libvips/deprecated/im_tiff2vips.c b/libvips/deprecated/im_tiff2vips.c index a5ded395..b082a443 100644 --- a/libvips/deprecated/im_tiff2vips.c +++ b/libvips/deprecated/im_tiff2vips.c @@ -46,6 +46,7 @@ #include #include +#include #include #include diff --git a/libvips/video/im_video_test.c b/libvips/deprecated/im_video_test.c similarity index 98% rename from libvips/video/im_video_test.c rename to libvips/deprecated/im_video_test.c index 39e86e94..12c9812d 100644 --- a/libvips/video/im_video_test.c +++ b/libvips/deprecated/im_video_test.c @@ -34,6 +34,7 @@ #include #include +#include /** * im_video_test: diff --git a/libvips/deprecated/im_vips2csv.c b/libvips/deprecated/im_vips2csv.c index 871c32c8..65e8dd79 100644 --- a/libvips/deprecated/im_vips2csv.c +++ b/libvips/deprecated/im_vips2csv.c @@ -37,6 +37,7 @@ #include #include +#include int im_vips2csv( IMAGE *in, const char *filename ) diff --git a/libvips/deprecated/im_vips2dz.c b/libvips/deprecated/im_vips2dz.c index 3a304991..6dbde78c 100644 --- a/libvips/deprecated/im_vips2dz.c +++ b/libvips/deprecated/im_vips2dz.c @@ -45,6 +45,7 @@ #include #include +#include int im_vips2dz( IMAGE *in, const char *filename ) diff --git a/libvips/deprecated/im_vips2jpeg.c b/libvips/deprecated/im_vips2jpeg.c index 375b4c13..8295ba34 100644 --- a/libvips/deprecated/im_vips2jpeg.c +++ b/libvips/deprecated/im_vips2jpeg.c @@ -46,6 +46,7 @@ #include #include +#include #include int diff --git a/libvips/deprecated/im_vips2mask.c b/libvips/deprecated/im_vips2mask.c index be95d55e..1f443328 100644 --- a/libvips/deprecated/im_vips2mask.c +++ b/libvips/deprecated/im_vips2mask.c @@ -48,6 +48,7 @@ #include #include +#include /** * im_vips2mask: diff --git a/libvips/deprecated/im_vips2png.c b/libvips/deprecated/im_vips2png.c index c5fa1ea1..4cf1fee6 100644 --- a/libvips/deprecated/im_vips2png.c +++ b/libvips/deprecated/im_vips2png.c @@ -45,6 +45,7 @@ #include #include +#include #include #include diff --git a/libvips/deprecated/im_vips2ppm.c b/libvips/deprecated/im_vips2ppm.c index a25555bf..67e620be 100644 --- a/libvips/deprecated/im_vips2ppm.c +++ b/libvips/deprecated/im_vips2ppm.c @@ -39,6 +39,7 @@ #include #include +#include int im_vips2ppm( IMAGE *in, const char *filename ) diff --git a/libvips/deprecated/im_vips2tiff.c b/libvips/deprecated/im_vips2tiff.c index 79d6684d..431c246d 100644 --- a/libvips/deprecated/im_vips2tiff.c +++ b/libvips/deprecated/im_vips2tiff.c @@ -45,6 +45,7 @@ #include #include +#include int im_vips2tiff( IMAGE *in, const char *filename ) diff --git a/libvips/deprecated/im_vips2webp.c b/libvips/deprecated/im_vips2webp.c index e2b13bcb..79083d00 100644 --- a/libvips/deprecated/im_vips2webp.c +++ b/libvips/deprecated/im_vips2webp.c @@ -39,6 +39,7 @@ #include #include +#include #include #include diff --git a/libvips/deprecated/im_webp2vips.c b/libvips/deprecated/im_webp2vips.c index e478f862..a8b7f15b 100644 --- a/libvips/deprecated/im_webp2vips.c +++ b/libvips/deprecated/im_webp2vips.c @@ -37,6 +37,7 @@ #include #include +#include #include #include "../foreign/pforeign.h" diff --git a/libvips/deprecated/im_zerox.c b/libvips/deprecated/im_zerox.c index 4c6bcf12..0197ad2e 100644 --- a/libvips/deprecated/im_zerox.c +++ b/libvips/deprecated/im_zerox.c @@ -51,6 +51,7 @@ #include #include +#include #define LOOP( TYPE ) { \ for( i = 0; i < ne; i++ ) { \ diff --git a/libvips/deprecated/inplace_dispatch.c b/libvips/deprecated/inplace_dispatch.c index 00bafbbc..0809a358 100644 --- a/libvips/deprecated/inplace_dispatch.c +++ b/libvips/deprecated/inplace_dispatch.c @@ -38,6 +38,7 @@ #include #include +#include /* Calculate a pixel for an image from a vec of double. Valid while im is * valid. diff --git a/libvips/deprecated/lazy.c b/libvips/deprecated/lazy.c index 3f86491f..d97c3815 100644 --- a/libvips/deprecated/lazy.c +++ b/libvips/deprecated/lazy.c @@ -46,6 +46,7 @@ #include #include +#include #include #include diff --git a/libvips/deprecated/mask_dispatch.c b/libvips/deprecated/mask_dispatch.c index 91dc822c..c69d7ffa 100644 --- a/libvips/deprecated/mask_dispatch.c +++ b/libvips/deprecated/mask_dispatch.c @@ -38,6 +38,7 @@ #include #include +#include /* One matrix in, one out. */ diff --git a/libvips/deprecated/matalloc.c b/libvips/deprecated/matalloc.c index c1ad116e..6884733f 100644 --- a/libvips/deprecated/matalloc.c +++ b/libvips/deprecated/matalloc.c @@ -13,6 +13,7 @@ #include #include +#include #define TINY 1.0e-200 diff --git a/libvips/deprecated/matlab.c b/libvips/deprecated/matlab.c index bfaa1bd8..7815198a 100644 --- a/libvips/deprecated/matlab.c +++ b/libvips/deprecated/matlab.c @@ -37,6 +37,7 @@ #include #include +#include int im_mat2vips( const char *filename, IMAGE *out ) diff --git a/libvips/deprecated/morph_dispatch.c b/libvips/deprecated/morph_dispatch.c index 1f573d35..cd2a2c82 100644 --- a/libvips/deprecated/morph_dispatch.c +++ b/libvips/deprecated/morph_dispatch.c @@ -38,6 +38,7 @@ #include #include +#include /* Args to im_profile. */ diff --git a/libvips/deprecated/mosaicing_dispatch.c b/libvips/deprecated/mosaicing_dispatch.c index 919a4749..e4749585 100644 --- a/libvips/deprecated/mosaicing_dispatch.c +++ b/libvips/deprecated/mosaicing_dispatch.c @@ -38,6 +38,7 @@ #include #include +#include #include #include diff --git a/libvips/deprecated/other_dispatch.c b/libvips/deprecated/other_dispatch.c index cddeb2f6..f31bdfda 100644 --- a/libvips/deprecated/other_dispatch.c +++ b/libvips/deprecated/other_dispatch.c @@ -38,6 +38,7 @@ #include #include +#include /* Args for im_sines. */ diff --git a/libvips/deprecated/package.c b/libvips/deprecated/package.c index b08279dc..fb5b4dbc 100644 --- a/libvips/deprecated/package.c +++ b/libvips/deprecated/package.c @@ -58,6 +58,7 @@ #include #include +#include #include #include diff --git a/libvips/deprecated/radiance.c b/libvips/deprecated/radiance.c index ba7941d6..5f62a5d7 100644 --- a/libvips/deprecated/radiance.c +++ b/libvips/deprecated/radiance.c @@ -37,6 +37,7 @@ #include #include +#include int im_rad2vips( const char *filename, IMAGE *out ) diff --git a/libvips/deprecated/raw.c b/libvips/deprecated/raw.c index f882ed49..2b9690f0 100644 --- a/libvips/deprecated/raw.c +++ b/libvips/deprecated/raw.c @@ -41,6 +41,7 @@ #include #include +#include int im_raw2vips( const char *filename, IMAGE *out, diff --git a/libvips/deprecated/rename.c b/libvips/deprecated/rename.c index b489eefb..28146b94 100644 --- a/libvips/deprecated/rename.c +++ b/libvips/deprecated/rename.c @@ -38,6 +38,7 @@ #include #include +#include #include int diff --git a/libvips/deprecated/resample_dispatch.c b/libvips/deprecated/resample_dispatch.c index 4ebe9fcc..74ac5dd7 100644 --- a/libvips/deprecated/resample_dispatch.c +++ b/libvips/deprecated/resample_dispatch.c @@ -38,6 +38,7 @@ #include #include +#include #include #include diff --git a/libvips/deprecated/rotmask.c b/libvips/deprecated/rotmask.c index 3863eebd..59aab9ff 100644 --- a/libvips/deprecated/rotmask.c +++ b/libvips/deprecated/rotmask.c @@ -55,6 +55,7 @@ #include #include +#include /* The type of the vips operations we support. */ diff --git a/libvips/deprecated/rw_mask.c b/libvips/deprecated/rw_mask.c index 4cab0cdf..36e3161c 100644 --- a/libvips/deprecated/rw_mask.c +++ b/libvips/deprecated/rw_mask.c @@ -95,6 +95,7 @@ #include #include +#include /** * INTMASK: diff --git a/libvips/deprecated/tone.c b/libvips/deprecated/tone.c index b0d735cc..2604f4ed 100644 --- a/libvips/deprecated/tone.c +++ b/libvips/deprecated/tone.c @@ -52,6 +52,7 @@ #include #include +#include /** * im_tone_map: diff --git a/libvips/video/video_dispatch.c b/libvips/deprecated/video_dispatch.c similarity index 99% rename from libvips/video/video_dispatch.c rename to libvips/deprecated/video_dispatch.c index f8abf320..6c84b3ff 100644 --- a/libvips/video/video_dispatch.c +++ b/libvips/deprecated/video_dispatch.c @@ -36,6 +36,7 @@ #include #include +#include /** * SECTION: video diff --git a/libvips/deprecated/vips7compat.c b/libvips/deprecated/vips7compat.c index 1a496a7a..0dc2a103 100644 --- a/libvips/deprecated/vips7compat.c +++ b/libvips/deprecated/vips7compat.c @@ -46,6 +46,7 @@ #include #include +#include #include #include #include @@ -5190,6 +5191,23 @@ im_global_balance( IMAGE *in, IMAGE *out, double gamma ) return( 0 ); } +int +im_histplot( IMAGE *in, IMAGE *out ) +{ + VipsImage *x; + + if( vips_hist_plot( in, &x, NULL ) ) + return( -1 ); + + if( vips_image_write( x, out ) ) { + g_object_unref( x ); + return( -1 ); + } + g_object_unref( x ); + + return( 0 ); +} + int im_global_balancef( IMAGE *in, IMAGE *out, double gamma ) { diff --git a/libvips/foreign/exif.c b/libvips/foreign/exif.c index d594bb10..ef3fcef6 100644 --- a/libvips/foreign/exif.c +++ b/libvips/foreign/exif.c @@ -413,8 +413,7 @@ vips_image_resolution_from_exif( VipsImage *image, ExifData *ed ) break; default: - vips_warn( "exif", - "%s", _( "unknown EXIF resolution unit" ) ); + g_warning( "%s", _( "unknown EXIF resolution unit" ) ); return( -1 ); } @@ -773,8 +772,7 @@ vips_exif_resolution_from_image( ExifData *ed, VipsImage *image ) break; default: - vips_warn( "exif", - "%s", _( "unknown EXIF resolution unit" ) ); + g_warning( "%s", _( "unknown EXIF resolution unit" ) ); return( 0 ); } @@ -946,7 +944,7 @@ vips_exif_image_field( VipsImage *image, /* value must be a string. */ if( vips_image_get_string( image, field, &string ) ) { - vips_warn( "exif", _( "bad exif meta \"%s\"" ), field ); + g_warning( _( "bad exif meta \"%s\"" ), field ); return( NULL ); } @@ -956,12 +954,12 @@ vips_exif_image_field( VipsImage *image, for( ; isdigit( *p ); p++ ) ; if( *p != '-' ) { - vips_warn( "exif", _( "bad exif meta \"%s\"" ), field ); + g_warning( _( "bad exif meta \"%s\"" ), field ); return( NULL ); } if( !(tag = exif_tag_from_name( p + 1 )) ) { - vips_warn( "exif", _( "bad exif meta \"%s\"" ), field ); + g_warning( _( "bad exif meta \"%s\"" ), field ); return( NULL ); } diff --git a/libvips/foreign/webp2vips.c b/libvips/foreign/webp2vips.c index b14a61b2..8e813e7f 100644 --- a/libvips/foreign/webp2vips.c +++ b/libvips/foreign/webp2vips.c @@ -244,7 +244,7 @@ read_header( Read *read, VipsImage *out ) bitstream.bytes = read->data; bitstream.size = read->length; if( !(mux = WebPMuxCreate( &bitstream, 0 )) ) { - vips_warn( "webp", "%s", _( "unable to read image metadata" ) ); + g_warning( "%s", _( "unable to read image metadata" ) ); return( 0 ); } diff --git a/libvips/histogram/hist_plot.c b/libvips/histogram/hist_plot.c index 033379b5..c7349e6b 100644 --- a/libvips/histogram/hist_plot.c +++ b/libvips/histogram/hist_plot.c @@ -70,52 +70,16 @@ #include "phistogram.h" -static int -plotalise( IMAGE *in, IMAGE *out ) -{ - if( im_check_uncoded( "im_histplot", in ) || - im_check_noncomplex( "im_histplot", in ) ) - return( -1 ); +typedef struct _VipsHistPlot { + VipsOperation parent_instance; - if( vips_bandfmt_isuint( in->BandFmt ) ) { - if( im_copy( in, out ) ) - return( -1 ); - } - else if( vips_bandfmt_isint( in->BandFmt ) ) { - double min; + VipsImage *in; + VipsImage *out; +} VipsHistPlot; - /* Move min up to 0. - */ - if( im_min( in, &min ) || - im_lintra( 1.0, in, -min, out ) ) - return( -1 ); - } - else { - /* Float image: scale min--max to 0--any. Output square - * graph. - */ - DOUBLEMASK *stats; - double min, max; - int any; +typedef VipsOperationClass VipsHistPlotClass; - if( in->Xsize == 1 ) - any = in->Ysize; - else - any = in->Xsize; - - if( !(stats = im_stats( in )) ) - return( -1 ); - min = IM_MASK( stats, 0, 0 ); - max = IM_MASK( stats, 1, 0 ); - im_free_dmask( stats ); - - if( im_lintra( any / (max - min), in, - -min * any / (max - min), out ) ) - return( -1 ); - } - - return( 0 ); -} +G_DEFINE_TYPE( VipsHistPlot, vips_hist_plot, VIPS_TYPE_OPERATION ); #define VERT( TYPE ) { \ TYPE *p1 = (TYPE *) p; \ @@ -131,31 +95,32 @@ plotalise( IMAGE *in, IMAGE *out ) /* Generate function. */ static int -make_vert_gen( REGION *or, void *seq, void *a, void *b ) +vips_hist_plot_vert_gen( VipsRegion *or, void *seq, void *a, void *b, + gboolean *stop ) { - IMAGE *in = (IMAGE *) a; - Rect *r = &or->valid; + VipsImage *in = (VipsImage *) a; + VipsRect *r = &or->valid; int le = r->left; int to = r->top; - int ri = IM_RECT_RIGHT( r ); - int bo = IM_RECT_BOTTOM( r ); + int ri = VIPS_RECT_RIGHT( r ); + int bo = VIPS_RECT_BOTTOM( r ); int nb = in->Bands; int x, y, z; for( y = to; y < bo; y++ ) { - VipsPel *q = IM_REGION_ADDR( or, le, y ); - VipsPel *p = IM_IMAGE_ADDR( in, 0, y ); + VipsPel *q = VIPS_REGION_ADDR( or, le, y ); + VipsPel *p = VIPS_IMAGE_ADDR( in, 0, y ); switch( in->BandFmt ) { - case IM_BANDFMT_UCHAR: VERT( unsigned char ); break; - case IM_BANDFMT_CHAR: VERT( signed char ); break; - case IM_BANDFMT_USHORT: VERT( unsigned short ); break; - case IM_BANDFMT_SHORT: VERT( signed short ); break; - case IM_BANDFMT_UINT: VERT( unsigned int ); break; - case IM_BANDFMT_INT: VERT( signed int ); break; - case IM_BANDFMT_FLOAT: VERT( float ); break; - case IM_BANDFMT_DOUBLE: VERT( double ); break; + case VIPS_FORMAT_UCHAR: VERT( unsigned char ); break; + case VIPS_FORMAT_CHAR: VERT( signed char ); break; + case VIPS_FORMAT_USHORT: VERT( unsigned short ); break; + case VIPS_FORMAT_SHORT: VERT( signed short ); break; + case VIPS_FORMAT_UINT: VERT( unsigned int ); break; + case VIPS_FORMAT_INT: VERT( signed int ); break; + case VIPS_FORMAT_FLOAT: VERT( float ); break; + case VIPS_FORMAT_DOUBLE: VERT( double ); break; default: g_assert_not_reached(); @@ -179,33 +144,34 @@ make_vert_gen( REGION *or, void *seq, void *a, void *b ) /* Generate function. */ static int -make_horz_gen( REGION *or, void *seq, void *a, void *b ) +vips_hist_plot_horz_gen( VipsRegion *or, void *seq, void *a, void *b, + gboolean *stop ) { - IMAGE *in = (IMAGE *) a; - Rect *r = &or->valid; + VipsImage *in = (VipsImage *) a; + VipsRect *r = &or->valid; int le = r->left; int to = r->top; - int ri = IM_RECT_RIGHT( r ); - int bo = IM_RECT_BOTTOM( r ); + int ri = VIPS_RECT_RIGHT( r ); + int bo = VIPS_RECT_BOTTOM( r ); int nb = in->Bands; - int lsk = IM_REGION_LSKIP( or ); + int lsk = VIPS_REGION_LSKIP( or ); int ht = or->im->Ysize; int x, y, z; for( x = le; x < ri; x++ ) { - VipsPel *q = IM_REGION_ADDR( or, x, to ); - VipsPel *p = IM_IMAGE_ADDR( in, x, 0 ); + VipsPel *q = VIPS_REGION_ADDR( or, x, to ); + VipsPel *p = VIPS_IMAGE_ADDR( in, x, 0 ); switch( in->BandFmt ) { - case IM_BANDFMT_UCHAR: HORZ( unsigned char ); break; - case IM_BANDFMT_CHAR: HORZ( signed char ); break; - case IM_BANDFMT_USHORT: HORZ( unsigned short ); break; - case IM_BANDFMT_SHORT: HORZ( signed short ); break; - case IM_BANDFMT_UINT: HORZ( unsigned int ); break; - case IM_BANDFMT_INT: HORZ( signed int ); break; - case IM_BANDFMT_FLOAT: HORZ( float ); break; - case IM_BANDFMT_DOUBLE: HORZ( double ); break; + case VIPS_FORMAT_UCHAR: HORZ( unsigned char ); break; + case VIPS_FORMAT_CHAR: HORZ( signed char ); break; + case VIPS_FORMAT_USHORT: HORZ( unsigned short ); break; + case VIPS_FORMAT_SHORT: HORZ( signed short ); break; + case VIPS_FORMAT_UINT: HORZ( unsigned int ); break; + case VIPS_FORMAT_INT: HORZ( signed int ); break; + case VIPS_FORMAT_FLOAT: HORZ( float ); break; + case VIPS_FORMAT_DOUBLE: HORZ( double ); break; default: g_assert_not_reached(); @@ -215,26 +181,68 @@ make_horz_gen( REGION *or, void *seq, void *a, void *b ) return( 0 ); } -/* Plot image. - */ static int -plot( IMAGE *in, IMAGE *out ) +vips_hist_plot_build( VipsObject *object ) { - double max; - int tsize; - int xsize; - int ysize; + VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object ); + VipsHistPlot *plot = (VipsHistPlot *) object; + VipsImage **t = (VipsImage **) vips_object_local_array( object, 2 ); - if( im_incheck( in ) || - im_poutcheck( out ) ) + VipsImage *in; + double min, max; + int width, height, tsize; + VipsGenerateFn generate_fn; + + g_object_set( plot, "out", vips_image_new(), NULL ); + + if( VIPS_OBJECT_CLASS( vips_hist_plot_parent_class )->build( object ) ) + return( -1 ); + + in = plot->in; + + if( vips_check_uncoded( class->nickname, in ) || + vips_check_noncomplex( class->nickname, in ) || + vips_check_hist( class->nickname, in ) ) + return( -1 ); + + if( vips_band_format_isint( in->BandFmt ) ) { + double min; + + /* Move min up to 0. + */ + if( vips_min( in, &min, NULL ) || + vips_linear1( in, &t[0], 1.0, -min, NULL ) ) + return( -1 ); + + in = t[0]; + } + else if( vips_band_format_isfloat( in->BandFmt ) ) { + /* Float image: scale min--max to 0--any. Output square + * graph. + */ + int any = in->Xsize * in->Ysize; + + if( vips_stats( in, &t[0], NULL ) ) + return( -1 ); + min = *VIPS_MATRIX( t[0], 0, 0 ); + max = *VIPS_MATRIX( t[0], 1, 0 ); + + if( vips_linear1( in, &t[1], + any / (max - min), -min * any / (max - min), NULL ) ) + return( -1 ); + + in = t[1]; + } + + if( vips_image_wio_input( in ) ) return( -1 ); /* Find range we will plot. */ - if( im_max( in, &max ) ) + if( vips_max( in, &max, NULL ) ) return( -1 ); g_assert( max >= 0 ); - if( in->BandFmt == IM_BANDFMT_UCHAR ) + if( in->BandFmt == VIPS_FORMAT_UCHAR ) tsize = 256; else tsize = VIPS_CEIL( max ); @@ -247,80 +255,30 @@ plot( IMAGE *in, IMAGE *out ) if( in->Xsize == 1 ) { /* Vertical graph. */ - xsize = tsize; - ysize = in->Ysize; + width = tsize; + height = in->Ysize; + generate_fn = vips_hist_plot_vert_gen; } else { /* Horizontal graph. */ - xsize = in->Xsize; - ysize = tsize; + width = in->Xsize; + height = tsize; + generate_fn = vips_hist_plot_horz_gen; } /* Set image. */ - im_initdesc( out, xsize, ysize, in->Bands, - IM_BBITS_BYTE, IM_BANDFMT_UCHAR, - IM_CODING_NONE, IM_TYPE_HISTOGRAM, 1.0, 1.0, 0, 0 ); + vips_image_init_fields( plot->out, width, height, in->Bands, + VIPS_FORMAT_UCHAR, VIPS_CODING_NONE, + VIPS_INTERPRETATION_HISTOGRAM, + 1.0, 1.0 ); + vips_image_pipelinev( plot->out, + VIPS_DEMAND_STYLE_ANY, NULL ); - /* Set hints - ANY is ok with us. - */ - if( im_demand_hint( out, IM_ANY, NULL ) ) + if( vips_image_generate( plot->out, + NULL, generate_fn, NULL, in, NULL ) ) return( -1 ); - - /* Generate image. - */ - if( in->Xsize == 1 ) { - if( im_generate( out, NULL, make_vert_gen, NULL, in, NULL ) ) - return( -1 ); - } - else { - if( im_generate( out, NULL, make_horz_gen, NULL, in, NULL ) ) - return( -1 ); - } - - return( 0 ); -} - -int -im_histplot( IMAGE *in, IMAGE *out ) -{ - IMAGE *t1; - - if( im_check_hist( "im_histplot", in ) ) - return( -1 ); - - if( !(t1 = im_open_local( out, "im_histplot:1", "p" )) || - plotalise( in, t1 ) || - plot( t1, out ) ) - return( -1 ); - - return( 0 ); -} - -typedef struct _VipsHistPlot { - VipsOperation parent_instance; - - VipsImage *in; - VipsImage *out; -} VipsHistPlot; - -typedef VipsOperationClass VipsHistPlotClass; - -G_DEFINE_TYPE( VipsHistPlot, vips_hist_plot, VIPS_TYPE_OPERATION ); - -static int -vips_hist_plot_build( VipsObject *object ) -{ - VipsHistPlot *plot = (VipsHistPlot *) object; - - g_object_set( plot, "out", vips_image_new(), NULL ); - - if( VIPS_OBJECT_CLASS( vips_hist_plot_parent_class )->build( object ) ) - return( -1 ); - - if( im_histplot( plot->in, plot->out ) ) - return( -1 ); return( 0 ); } diff --git a/libvips/include/vips/internal.h b/libvips/include/vips/internal.h index 679c6a02..9365efbd 100644 --- a/libvips/include/vips/internal.h +++ b/libvips/include/vips/internal.h @@ -233,6 +233,8 @@ int vips__byteswap_bool( VipsImage *in, VipsImage **out, gboolean swap ); char *vips__xml_properties( VipsImage *image ); void vips__cairo2rgba( guint32 *buf, int n ); +void vips__Lab2LabQ_vec( VipsPel *out, float *in, int width ); +void vips__LabQ2Lab_vec( float *out, VipsPel *in, int width ); #ifdef DEBUG_LEAK extern GQuark vips__image_pixels_quark; @@ -251,6 +253,11 @@ int vips__foreign_convert_saveable( VipsImage *in, VipsImage **ready, VipsSaveable saveable, VipsBandFormat *format, VipsCoding *coding, VipsArrayDouble *background ); +int vips_foreign_load( const char *filename, VipsImage **out, ... ) + __attribute__((sentinel)); +int vips_foreign_save( VipsImage *in, const char *filename, ... ) + __attribute__((sentinel)); + int vips__image_intize( VipsImage *in, VipsImage **out ); void vips__reorder_init( void ); diff --git a/libvips/include/vips/vips.h b/libvips/include/vips/vips.h index 75c6c3b4..0bedf6f5 100644 --- a/libvips/include/vips/vips.h +++ b/libvips/include/vips/vips.h @@ -46,6 +46,8 @@ * - include , thanks nicola * 30/6/09 * - move deprecated stuff to its own header + * 16/5/18 + * - remove old vips7 stuff, you must explicitly include it now */ /* @@ -147,20 +149,6 @@ extern "C" { #include #include -/* This stuff is very, very old and should not be used by anyone now. - */ -#ifdef VIPS_ENABLE_ANCIENT -#include -#endif /*VIPS_ENABLE_ANCIENT*/ - -/* Still in use, but can be turned off. - */ -#ifdef VIPS_ENABLE_DEPRECATED -#include -#include -#include -#endif /*VIPS_ENABLE_DEPRECATED*/ - /* We can't use _ here since this will be compiled by our clients and they may * not have _(). */ diff --git a/libvips/include/vips/vips7compat.h b/libvips/include/vips/vips7compat.h index e18a4213..5e893cec 100644 --- a/libvips/include/vips/vips7compat.h +++ b/libvips/include/vips/vips7compat.h @@ -1115,13 +1115,6 @@ int im_correl( VipsImage *ref, VipsImage *sec, int im_align_bands( VipsImage *in, VipsImage *out ); int im_maxpos_subpel( VipsImage *in, double *x, double *y ); -/* These were public for a while, keep for compat. - */ -int vips_foreign_load( const char *filename, VipsImage **out, ... ) - __attribute__((sentinel)); -int vips_foreign_save( VipsImage *in, const char *filename, ... ) - __attribute__((sentinel)); - VipsImage *vips__deprecated_open_read( const char *filename, gboolean sequential ); VipsImage *vips__deprecated_open_write( const char *filename ); @@ -1187,8 +1180,6 @@ void imb_XYZ2Lab( float *, float *, int, im_colour_temperature * ); void imb_LabS2Lab( signed short *, float *, int ); void imb_Lab2LabS( float *, signed short *, int n ); -void vips__Lab2LabQ_vec( VipsPel *out, float *in, int width ); -void vips__LabQ2Lab_vec( float *out, VipsPel *in, int width ); void im_copy_dmask_matrix( DOUBLEMASK *mask, double **matrix ); void im_copy_matrix_dmask( double **matrix, DOUBLEMASK *mask ); @@ -1231,6 +1222,15 @@ GOptionGroup *vips_get_option_group( void ); */ VipsWindow *vips_window_ref( VipsImage *im, int top, int height ); +/* This stuff is very, very old and should not be used by anyone now. + */ +#ifdef VIPS_ENABLE_ANCIENT +#include +#endif /*VIPS_ENABLE_ANCIENT*/ + +#include +#include + #ifdef __cplusplus } #endif /*__cplusplus*/ diff --git a/libvips/iofuncs/init.c b/libvips/iofuncs/init.c index 9d4d9588..6612eb35 100644 --- a/libvips/iofuncs/init.c +++ b/libvips/iofuncs/init.c @@ -88,6 +88,7 @@ #include #include #include +#include /* abort() on the first warning or error. */ diff --git a/libvips/morphology/hitmiss.c b/libvips/morphology/hitmiss.c index 9a78772f..e43aaff4 100644 --- a/libvips/morphology/hitmiss.c +++ b/libvips/morphology/hitmiss.c @@ -65,6 +65,7 @@ #include #include +#include #include /* The two operators we implement. They are more hit-miss, really. diff --git a/libvips/morphology/morph.c b/libvips/morphology/morph.c index d19833a0..db4e94f1 100644 --- a/libvips/morphology/morph.c +++ b/libvips/morphology/morph.c @@ -44,6 +44,7 @@ #include #include +#include #include #include "pmorphology.h" diff --git a/libvips/morphology/rank.c b/libvips/morphology/rank.c index d0a52851..e9aa7661 100644 --- a/libvips/morphology/rank.c +++ b/libvips/morphology/rank.c @@ -105,7 +105,7 @@ vips_rank_stop( void *vseq, void *a, void *b ) } static void * -vips_rank_start( IMAGE *out, void *a, void *b ) +vips_rank_start( VipsImage *out, void *a, void *b ) { VipsImage *in = (VipsImage *) a; VipsRank *rank = (VipsRank *) b; diff --git a/libvips/mosaicing/global_balance.c b/libvips/mosaicing/global_balance.c index 4b2ba12d..9b6b64fe 100644 --- a/libvips/mosaicing/global_balance.c +++ b/libvips/mosaicing/global_balance.c @@ -108,6 +108,7 @@ #include #include +#include #include #include "pmosaicing.h" diff --git a/libvips/mosaicing/im_avgdxdy.c b/libvips/mosaicing/im_avgdxdy.c index ff4fc63c..b2ff9026 100644 --- a/libvips/mosaicing/im_avgdxdy.c +++ b/libvips/mosaicing/im_avgdxdy.c @@ -52,6 +52,7 @@ #include #include +#include #include "pmosaicing.h" diff --git a/libvips/mosaicing/im_chkpair.c b/libvips/mosaicing/im_chkpair.c index aaa57a1b..90d09035 100644 --- a/libvips/mosaicing/im_chkpair.c +++ b/libvips/mosaicing/im_chkpair.c @@ -54,6 +54,7 @@ #include #include +#include #include "pmosaicing.h" diff --git a/libvips/mosaicing/im_clinear.c b/libvips/mosaicing/im_clinear.c index e53618e3..b567e88b 100644 --- a/libvips/mosaicing/im_clinear.c +++ b/libvips/mosaicing/im_clinear.c @@ -57,6 +57,7 @@ #include #include +#include #include #include "pmosaicing.h" diff --git a/libvips/mosaicing/im_improve.c b/libvips/mosaicing/im_improve.c index 5ca54d45..8b36e085 100644 --- a/libvips/mosaicing/im_improve.c +++ b/libvips/mosaicing/im_improve.c @@ -56,6 +56,7 @@ #include #include +#include #include "pmosaicing.h" diff --git a/libvips/mosaicing/im_initialize.c b/libvips/mosaicing/im_initialize.c index 0b57e319..98dbd188 100644 --- a/libvips/mosaicing/im_initialize.c +++ b/libvips/mosaicing/im_initialize.c @@ -34,6 +34,7 @@ #include #include +#include #include "pmosaicing.h" diff --git a/libvips/mosaicing/im_lrcalcon.c b/libvips/mosaicing/im_lrcalcon.c index 4b8aa587..fe2af8fd 100644 --- a/libvips/mosaicing/im_lrcalcon.c +++ b/libvips/mosaicing/im_lrcalcon.c @@ -86,6 +86,7 @@ #include #include +#include #include "pmosaicing.h" diff --git a/libvips/mosaicing/im_lrmerge.c b/libvips/mosaicing/im_lrmerge.c index cdb012cc..5ad06b0e 100644 --- a/libvips/mosaicing/im_lrmerge.c +++ b/libvips/mosaicing/im_lrmerge.c @@ -128,6 +128,7 @@ */ #include +#include #include #include #include diff --git a/libvips/mosaicing/im_lrmosaic.c b/libvips/mosaicing/im_lrmosaic.c index b502ce7d..3f425d3a 100644 --- a/libvips/mosaicing/im_lrmosaic.c +++ b/libvips/mosaicing/im_lrmosaic.c @@ -63,6 +63,7 @@ #include #include +#include #include "pmosaicing.h" diff --git a/libvips/mosaicing/im_remosaic.c b/libvips/mosaicing/im_remosaic.c index c90db327..2c6a42a4 100644 --- a/libvips/mosaicing/im_remosaic.c +++ b/libvips/mosaicing/im_remosaic.c @@ -51,6 +51,7 @@ #include #include +#include #include #include "pmosaicing.h" diff --git a/libvips/mosaicing/im_tbcalcon.c b/libvips/mosaicing/im_tbcalcon.c index 2d4d445f..6b68e9cd 100644 --- a/libvips/mosaicing/im_tbcalcon.c +++ b/libvips/mosaicing/im_tbcalcon.c @@ -73,6 +73,7 @@ #include #include +#include #include #include "pmosaicing.h" diff --git a/libvips/mosaicing/im_tbmerge.c b/libvips/mosaicing/im_tbmerge.c index 09afb6ff..f3e27b5d 100644 --- a/libvips/mosaicing/im_tbmerge.c +++ b/libvips/mosaicing/im_tbmerge.c @@ -110,6 +110,7 @@ #include #include +#include #include #include #include diff --git a/libvips/mosaicing/im_tbmosaic.c b/libvips/mosaicing/im_tbmosaic.c index 5ebcddb1..0c70b0be 100644 --- a/libvips/mosaicing/im_tbmosaic.c +++ b/libvips/mosaicing/im_tbmosaic.c @@ -63,6 +63,7 @@ #include #include +#include #include #include "pmosaicing.h" diff --git a/libvips/mosaicing/match.c b/libvips/mosaicing/match.c index 77b142a4..d9b6c305 100644 --- a/libvips/mosaicing/match.c +++ b/libvips/mosaicing/match.c @@ -37,6 +37,7 @@ #include #include +#include #include "pmosaicing.h" diff --git a/libvips/mosaicing/merge.c b/libvips/mosaicing/merge.c index ad21e2e3..d309b8e0 100644 --- a/libvips/mosaicing/merge.c +++ b/libvips/mosaicing/merge.c @@ -46,6 +46,7 @@ #include #include +#include typedef struct { VipsOperation parent_instance; diff --git a/libvips/mosaicing/mosaic.c b/libvips/mosaicing/mosaic.c index 5ec010ef..11e1aade 100644 --- a/libvips/mosaicing/mosaic.c +++ b/libvips/mosaicing/mosaic.c @@ -44,6 +44,7 @@ #include #include +#include #include "pmosaicing.h" diff --git a/libvips/mosaicing/mosaic1.c b/libvips/mosaicing/mosaic1.c index d0afd876..80ccda25 100644 --- a/libvips/mosaicing/mosaic1.c +++ b/libvips/mosaicing/mosaic1.c @@ -53,6 +53,7 @@ #include #include +#include #include #include diff --git a/libvips/video/Makefile.am b/libvips/video/Makefile.am deleted file mode 100644 index 44b08e11..00000000 --- a/libvips/video/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -noinst_LTLIBRARIES = libvideo.la - -libvideo_la_SOURCES = \ - video_dispatch.c \ - im_video_test.c - -AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ diff --git a/libvipsCC/VDisplay.cc b/libvipsCC/VDisplay.cc index ffe06dfa..c414e778 100644 --- a/libvipsCC/VDisplay.cc +++ b/libvipsCC/VDisplay.cc @@ -36,6 +36,7 @@ #include #include +#include #include #include diff --git a/libvipsCC/VError.cc b/libvipsCC/VError.cc index acb4b31c..5081f672 100644 --- a/libvipsCC/VError.cc +++ b/libvipsCC/VError.cc @@ -38,6 +38,7 @@ #include #include +#include #include diff --git a/libvipsCC/VImage.cc b/libvipsCC/VImage.cc index fd543953..0eaa61ea 100644 --- a/libvipsCC/VImage.cc +++ b/libvipsCC/VImage.cc @@ -37,6 +37,7 @@ #include #include +#include #include #include diff --git a/libvipsCC/VMask.cc b/libvipsCC/VMask.cc index 91322a5f..573776d2 100644 --- a/libvipsCC/VMask.cc +++ b/libvipsCC/VMask.cc @@ -36,6 +36,7 @@ #include #include +#include #include diff --git a/swig/vipsCC/VImage.i b/swig/vipsCC/VImage.i index 9f366b39..6f4f68ef 100644 --- a/swig/vipsCC/VImage.i +++ b/swig/vipsCC/VImage.i @@ -21,6 +21,7 @@ * frombuffer/tobuffer stuff. */ #include +#include %} /* Need to override assignment to get refcounting working. diff --git a/tools/vips.c b/tools/vips.c index de331858..f1074502 100644 --- a/tools/vips.c +++ b/tools/vips.c @@ -92,6 +92,7 @@ #include #include +#include #include #ifdef OS_WIN32 diff --git a/tools/vipsedit.c b/tools/vipsedit.c index e1349c8e..b2b0e748 100644 --- a/tools/vipsedit.c +++ b/tools/vipsedit.c @@ -59,6 +59,7 @@ Copyright K.Martinez 30/6/93 #include #include +#include #include #include