remove vips7 stuff from API
You must now include vips7 support explicitly with #include <vips/vips7compat.h> in your code just after including `vips.h`. The old vips7 names, such as `Rect`, were starting to cause problems with other packages like opencv.
This commit is contained in:
parent
fd7b04fb9d
commit
b085908558
@ -21,6 +21,7 @@
|
|||||||
- tiffload, pdfload, magickload set VIPS_META_N_PAGES "n-pages" metadata item
|
- tiffload, pdfload, magickload set VIPS_META_N_PAGES "n-pages" metadata item
|
||||||
- add fontfile option to vips_text() [fangqiao]
|
- add fontfile option to vips_text() [fangqiao]
|
||||||
- add vips_transpose3d() -- swap major dimensions in a volumetric image
|
- 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
|
12/3/18 started 8.6.4
|
||||||
- better fitting of fonts with overhanging edges [Adrià]
|
- better fitting of fonts with overhanging edges [Adrià]
|
||||||
|
@ -1278,7 +1278,6 @@ AC_OUTPUT([
|
|||||||
libvips/mosaicing/Makefile
|
libvips/mosaicing/Makefile
|
||||||
libvips/create/Makefile
|
libvips/create/Makefile
|
||||||
libvips/resample/Makefile
|
libvips/resample/Makefile
|
||||||
libvips/video/Makefile
|
|
||||||
libvipsCC/include/Makefile
|
libvipsCC/include/Makefile
|
||||||
libvipsCC/include/vips/Makefile
|
libvipsCC/include/vips/Makefile
|
||||||
libvipsCC/Makefile
|
libvipsCC/Makefile
|
||||||
|
@ -24,8 +24,7 @@ SUBDIRS = \
|
|||||||
iofuncs \
|
iofuncs \
|
||||||
morphology \
|
morphology \
|
||||||
mosaicing \
|
mosaicing \
|
||||||
create \
|
create
|
||||||
video \
|
|
||||||
.
|
.
|
||||||
|
|
||||||
lib_LTLIBRARIES = libvips.la
|
lib_LTLIBRARIES = libvips.la
|
||||||
@ -52,7 +51,6 @@ libvips_la_LIBADD = \
|
|||||||
morphology/libmorphology.la \
|
morphology/libmorphology.la \
|
||||||
mosaicing/libmosaicing.la \
|
mosaicing/libmosaicing.la \
|
||||||
create/libcreate.la \
|
create/libcreate.la \
|
||||||
video/libvideo.la \
|
|
||||||
@VIPS_LIBS@
|
@VIPS_LIBS@
|
||||||
|
|
||||||
libvips_la_LDFLAGS = \
|
libvips_la_LDFLAGS = \
|
||||||
|
@ -409,7 +409,7 @@ vips_stats_class_init( VipsStatsClass *class )
|
|||||||
gobject_class->get_property = vips_object_get_property;
|
gobject_class->get_property = vips_object_get_property;
|
||||||
|
|
||||||
object_class->nickname = "stats";
|
object_class->nickname = "stats";
|
||||||
object_class->description = _( "find image average" );
|
object_class->description = _( "find many image stats" );
|
||||||
object_class->build = vips_stats_build;
|
object_class->build = vips_stats_build;
|
||||||
|
|
||||||
sclass->start = vips_stats_start;
|
sclass->start = vips_stats_start;
|
||||||
|
@ -372,7 +372,7 @@ vips_convasep_stop( void *vseq, void *a, void *b )
|
|||||||
static void *
|
static void *
|
||||||
vips_convasep_start( VipsImage *out, void *a, void *b )
|
vips_convasep_start( VipsImage *out, void *a, void *b )
|
||||||
{
|
{
|
||||||
VipsImage *in = (IMAGE *) a;
|
VipsImage *in = (VipsImage *) a;
|
||||||
VipsConvasep *convasep = (VipsConvasep *) b;
|
VipsConvasep *convasep = (VipsConvasep *) b;
|
||||||
|
|
||||||
VipsConvasepSeq *seq;
|
VipsConvasepSeq *seq;
|
||||||
|
@ -176,7 +176,7 @@ vips_convf_start( VipsImage *out, void *a, void *b )
|
|||||||
/* Convolve!
|
/* Convolve!
|
||||||
*/
|
*/
|
||||||
static int
|
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;
|
VipsConvfSequence *seq = (VipsConvfSequence *) vseq;
|
||||||
VipsConvf *convf = (VipsConvf *) b;
|
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
|
/* Prepare output. Consider a 7x7 mask and a 7x7 image --- the output
|
||||||
* would be 1x1.
|
* would be 1x1.
|
||||||
*/
|
*/
|
||||||
if( vips_bandfmt_isint( in->BandFmt ) )
|
if( vips_band_format_isint( in->BandFmt ) )
|
||||||
convolution->out->BandFmt = IM_BANDFMT_FLOAT;
|
convolution->out->BandFmt = VIPS_FORMAT_FLOAT;
|
||||||
convolution->out->Xsize -= M->Xsize - 1;
|
convolution->out->Xsize -= M->Xsize - 1;
|
||||||
convolution->out->Ysize -= M->Ysize - 1;
|
convolution->out->Ysize -= M->Ysize - 1;
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
noinst_LTLIBRARIES = libdeprecated.la
|
noinst_LTLIBRARIES = libdeprecated.la
|
||||||
|
|
||||||
libdeprecated_la_SOURCES = \
|
libdeprecated_la_SOURCES = \
|
||||||
|
video_dispatch.c \
|
||||||
|
im_video_test.c \
|
||||||
cimg_dispatch.c \
|
cimg_dispatch.c \
|
||||||
inplace_dispatch.c \
|
inplace_dispatch.c \
|
||||||
tone.c \
|
tone.c \
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/* One image in, one out.
|
/* One image in, one out.
|
||||||
*/
|
*/
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
static int
|
static int
|
||||||
greyc_vec( im_object *argv )
|
greyc_vec( im_object *argv )
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/* One image in, one out.
|
/* One image in, one out.
|
||||||
*/
|
*/
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include <vips/intl.h>
|
#include <vips/intl.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
static int
|
static int
|
||||||
system_vec( im_object *argv )
|
system_vec( im_object *argv )
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/* One image in, one out.
|
/* One image in, one out.
|
||||||
*/
|
*/
|
||||||
|
@ -75,6 +75,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
static
|
static
|
||||||
int im_cooc_sym(IMAGE *im, IMAGE *m, int xpos, int ypos, int xsize, int ysize, int dx, int dy)
|
int im_cooc_sym(IMAGE *im, IMAGE *m, int xpos, int ypos, int xsize, int ysize, int dx, int dy)
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
|
|
||||||
/* One image in, one out.
|
/* One image in, one out.
|
||||||
|
@ -47,6 +47,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
|
|
||||||
/* String containing each of the characters which can be used within a
|
/* String containing each of the characters which can be used within a
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
#include <vips/debug.h>
|
#include <vips/debug.h>
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
|
|
||||||
/* To iterate over supported formats, we build a temp list of subclasses of
|
/* To iterate over supported formats, we build a temp list of subclasses of
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
static int
|
static int
|
||||||
jpeg2vips_vec( im_object *argv )
|
jpeg2vips_vec( im_object *argv )
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/* One image in, one out.
|
/* One image in, one out.
|
||||||
*/
|
*/
|
||||||
|
@ -72,6 +72,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/* Keep the greylevel difference matrix as a 256x1 double image */
|
/* Keep the greylevel difference matrix as a 256x1 double image */
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/* One image in, one out.
|
/* One image in, one out.
|
||||||
*/
|
*/
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
|
|
||||||
#include <vips/intl.h>
|
#include <vips/intl.h>
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* im_align_bands:
|
* im_align_bands:
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include <vips/intl.h>
|
#include <vips/intl.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
static VipsFormatFlags
|
static VipsFormatFlags
|
||||||
analyze_flags( const char *filename )
|
analyze_flags( const char *filename )
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
@ -52,6 +52,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
static int
|
static int
|
||||||
extract( IMAGE *in, int x, int y, int w, int h )
|
extract( IMAGE *in, int x, int y, int w, int h )
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -47,6 +47,7 @@
|
|||||||
#include <vips/intl.h>
|
#include <vips/intl.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -55,6 +55,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
|
|
||||||
/* Create multiplication luts for all non zero elements of the original mask;
|
/* Create multiplication luts for all non zero elements of the original mask;
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
#include "../foreign/pforeign.h"
|
#include "../foreign/pforeign.h"
|
||||||
|
|
||||||
|
@ -57,6 +57,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
im_debugim( IMAGE *in )
|
im_debugim( IMAGE *in )
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -46,6 +46,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
#include <vips/thread.h>
|
#include <vips/thread.h>
|
||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@ Copyright (C) 1992, Kirk Martinez, History of Art Dept, Birkbeck College
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
#define ARGS "fav4: frame average 4 frames\nARGS: im1 im2 im3 im4 outfile"
|
#define ARGS "fav4: frame average 4 frames\nARGS: im1 im2 im3 im4 outfile"
|
||||||
#define NFRAMES 4
|
#define NFRAMES 4
|
||||||
|
@ -46,6 +46,7 @@
|
|||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
|
|
||||||
/* Make a mask image.
|
/* Make a mask image.
|
||||||
|
@ -57,6 +57,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
int im_gfadd(double a, IMAGE *in1, double b, IMAGE *in2, double c, IMAGE *out);
|
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);
|
int im_gaddim(double a, IMAGE *in1, double b, IMAGE *in2, double c, IMAGE *out);
|
||||||
|
@ -58,6 +58,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/* This function works on either mmaped files or on images in buffer
|
/* This function works on either mmaped files or on images in buffer
|
||||||
*/
|
*/
|
||||||
|
@ -61,6 +61,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/* uchar char ushort short uint int float double */
|
/* uchar char ushort short uint int float double */
|
||||||
static int array[8][8] = {
|
static int array[8][8] = {
|
||||||
|
@ -47,6 +47,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
|
|
||||||
/** LOCAL TYPES **/
|
/** LOCAL TYPES **/
|
||||||
|
@ -47,6 +47,7 @@
|
|||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
#include "../foreign/pforeign.h"
|
#include "../foreign/pforeign.h"
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -52,6 +52,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
int im_line(image, x1, y1, x2, y2, pelval)
|
int im_line(image, x1, y1, x2, y2, pelval)
|
||||||
IMAGE *image;
|
IMAGE *image;
|
||||||
|
@ -50,6 +50,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
|
|
||||||
/** TYPES **/
|
/** TYPES **/
|
||||||
|
@ -66,6 +66,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/* If maximum output is > 255 scale output between minout and maxout,
|
/* If maximum output is > 255 scale output between minout and maxout,
|
||||||
* by normalising maxout to 255.
|
* by normalising maxout to 255.
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include <vips/intl.h>
|
#include <vips/intl.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
#include "../foreign/pforeign.h"
|
#include "../foreign/pforeign.h"
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* im_mask2vips:
|
* im_mask2vips:
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* im_matcat:
|
* im_matcat:
|
||||||
|
@ -54,6 +54,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
|
|
||||||
/** CONSTANTS **/
|
/** CONSTANTS **/
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* im_matmul:
|
* im_matmul:
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* im_mattrn:
|
* im_mattrn:
|
||||||
|
@ -62,6 +62,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
|
|
||||||
/* A position and maximum.
|
/* A position and maximum.
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
|
|
||||||
#define MOST_OF( A, B ) ( (A) > 0.9 * (B) )
|
#define MOST_OF( A, B ) ( (A) > 0.9 * (B) )
|
||||||
|
@ -60,6 +60,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/* Measure into array.
|
/* Measure into array.
|
||||||
*/
|
*/
|
||||||
|
@ -50,6 +50,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
#include <vips/thread.h>
|
#include <vips/thread.h>
|
||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
|
|
||||||
#include "../foreign/pforeign.h"
|
#include "../foreign/pforeign.h"
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* im_point:
|
* im_point:
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include <vips/intl.h>
|
#include <vips/intl.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
im_ppm2vips( const char *filename, IMAGE *out )
|
im_ppm2vips( const char *filename, IMAGE *out )
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/* Print a string to stdout, with a "\n". Sometimes useful for debugging
|
/* Print a string to stdout, with a "\n". Sometimes useful for debugging
|
||||||
* language bindings.
|
* language bindings.
|
||||||
|
@ -54,6 +54,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/* Useful: Call a macro with the name, type pairs for all VIPS functions.
|
/* Useful: Call a macro with the name, type pairs for all VIPS functions.
|
||||||
*/
|
*/
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/* What we do for each pel.
|
/* What we do for each pel.
|
||||||
*/
|
*/
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
void im_setbox(IMAGE_BOX *pbox, int xst, int yst, int xsiz, int ysiz, int ch_select)
|
void im_setbox(IMAGE_BOX *pbox, int xst, int yst, int xsiz, int ysiz, int ch_select)
|
||||||
{
|
{
|
||||||
|
@ -49,6 +49,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* im_simcontr:
|
* im_simcontr:
|
||||||
|
@ -55,6 +55,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
#define BRIGHT 255
|
#define BRIGHT 255
|
||||||
#define GREY 128
|
#define GREY 128
|
||||||
|
@ -52,6 +52,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
im_spatres( IMAGE *in, IMAGE *out, int step )
|
im_spatres( IMAGE *in, IMAGE *out, int step )
|
||||||
|
@ -62,6 +62,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/* Data for the cubic interpolation function.
|
/* Data for the cubic interpolation function.
|
||||||
*/
|
*/
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/* Useful: Call a macro with the name, type pairs for all VIPS functions. */
|
/* Useful: Call a macro with the name, type pairs for all VIPS functions. */
|
||||||
#define BRIGHT 255
|
#define BRIGHT 255
|
||||||
|
@ -46,6 +46,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
#include <vips/thread.h>
|
#include <vips/thread.h>
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include <vips/intl.h>
|
#include <vips/intl.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* im_video_test:
|
* im_video_test:
|
@ -37,6 +37,7 @@
|
|||||||
#include <vips/intl.h>
|
#include <vips/intl.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
im_vips2csv( IMAGE *in, const char *filename )
|
im_vips2csv( IMAGE *in, const char *filename )
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
im_vips2dz( IMAGE *in, const char *filename )
|
im_vips2dz( IMAGE *in, const char *filename )
|
||||||
|
@ -46,6 +46,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* im_vips2mask:
|
* im_vips2mask:
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
#include <vips/debug.h>
|
#include <vips/debug.h>
|
||||||
|
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
im_vips2ppm( IMAGE *in, const char *filename )
|
im_vips2ppm( IMAGE *in, const char *filename )
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
im_vips2tiff( IMAGE *in, const char *filename )
|
im_vips2tiff( IMAGE *in, const char *filename )
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
#include <vips/debug.h>
|
#include <vips/debug.h>
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
|
|
||||||
#include "../foreign/pforeign.h"
|
#include "../foreign/pforeign.h"
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
#define LOOP( TYPE ) { \
|
#define LOOP( TYPE ) { \
|
||||||
for( i = 0; i < ne; i++ ) { \
|
for( i = 0; i < ne; i++ ) { \
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/* Calculate a pixel for an image from a vec of double. Valid while im is
|
/* Calculate a pixel for an image from a vec of double. Valid while im is
|
||||||
* valid.
|
* valid.
|
||||||
|
@ -46,6 +46,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
#include <vips/debug.h>
|
#include <vips/debug.h>
|
||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/* One matrix in, one out.
|
/* One matrix in, one out.
|
||||||
*/
|
*/
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
#define TINY 1.0e-200
|
#define TINY 1.0e-200
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include <vips/intl.h>
|
#include <vips/intl.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
im_mat2vips( const char *filename, IMAGE *out )
|
im_mat2vips( const char *filename, IMAGE *out )
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/* Args to im_profile.
|
/* Args to im_profile.
|
||||||
*/
|
*/
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
#include <vips/transform.h>
|
#include <vips/transform.h>
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/* Args for im_sines.
|
/* Args for im_sines.
|
||||||
*/
|
*/
|
||||||
|
@ -58,6 +58,7 @@
|
|||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
#include <vips/debug.h>
|
#include <vips/debug.h>
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include <vips/intl.h>
|
#include <vips/intl.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
im_rad2vips( const char *filename, IMAGE *out )
|
im_rad2vips( const char *filename, IMAGE *out )
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include <vips/intl.h>
|
#include <vips/intl.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
im_raw2vips( const char *filename, IMAGE *out,
|
im_raw2vips( const char *filename, IMAGE *out,
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
#include <vips/transform.h>
|
#include <vips/transform.h>
|
||||||
|
|
||||||
|
@ -55,6 +55,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/* The type of the vips operations we support.
|
/* The type of the vips operations we support.
|
||||||
*/
|
*/
|
||||||
|
@ -95,6 +95,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* INTMASK:
|
* INTMASK:
|
||||||
|
@ -52,6 +52,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* im_tone_map:
|
* im_tone_map:
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION: video
|
* SECTION: video
|
@ -46,6 +46,7 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
|
#include <vips/vips7compat.h>
|
||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
#include <vips/debug.h>
|
#include <vips/debug.h>
|
||||||
#include <vips/vector.h>
|
#include <vips/vector.h>
|
||||||
@ -5190,6 +5191,23 @@ im_global_balance( IMAGE *in, IMAGE *out, double gamma )
|
|||||||
return( 0 );
|
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
|
int
|
||||||
im_global_balancef( IMAGE *in, IMAGE *out, double gamma )
|
im_global_balancef( IMAGE *in, IMAGE *out, double gamma )
|
||||||
{
|
{
|
||||||
|
@ -413,8 +413,7 @@ vips_image_resolution_from_exif( VipsImage *image, ExifData *ed )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
vips_warn( "exif",
|
g_warning( "%s", _( "unknown EXIF resolution unit" ) );
|
||||||
"%s", _( "unknown EXIF resolution unit" ) );
|
|
||||||
return( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -773,8 +772,7 @@ vips_exif_resolution_from_image( ExifData *ed, VipsImage *image )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
vips_warn( "exif",
|
g_warning( "%s", _( "unknown EXIF resolution unit" ) );
|
||||||
"%s", _( "unknown EXIF resolution unit" ) );
|
|
||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -946,7 +944,7 @@ vips_exif_image_field( VipsImage *image,
|
|||||||
/* value must be a string.
|
/* value must be a string.
|
||||||
*/
|
*/
|
||||||
if( vips_image_get_string( image, field, &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 );
|
return( NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -956,12 +954,12 @@ vips_exif_image_field( VipsImage *image,
|
|||||||
for( ; isdigit( *p ); p++ )
|
for( ; isdigit( *p ); p++ )
|
||||||
;
|
;
|
||||||
if( *p != '-' ) {
|
if( *p != '-' ) {
|
||||||
vips_warn( "exif", _( "bad exif meta \"%s\"" ), field );
|
g_warning( _( "bad exif meta \"%s\"" ), field );
|
||||||
return( NULL );
|
return( NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !(tag = exif_tag_from_name( p + 1 )) ) {
|
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 );
|
return( NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ read_header( Read *read, VipsImage *out )
|
|||||||
bitstream.bytes = read->data;
|
bitstream.bytes = read->data;
|
||||||
bitstream.size = read->length;
|
bitstream.size = read->length;
|
||||||
if( !(mux = WebPMuxCreate( &bitstream, 0 )) ) {
|
if( !(mux = WebPMuxCreate( &bitstream, 0 )) ) {
|
||||||
vips_warn( "webp", "%s", _( "unable to read image metadata" ) );
|
g_warning( "%s", _( "unable to read image metadata" ) );
|
||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,52 +70,16 @@
|
|||||||
|
|
||||||
#include "phistogram.h"
|
#include "phistogram.h"
|
||||||
|
|
||||||
static int
|
typedef struct _VipsHistPlot {
|
||||||
plotalise( IMAGE *in, IMAGE *out )
|
VipsOperation parent_instance;
|
||||||
{
|
|
||||||
if( im_check_uncoded( "im_histplot", in ) ||
|
|
||||||
im_check_noncomplex( "im_histplot", in ) )
|
|
||||||
return( -1 );
|
|
||||||
|
|
||||||
if( vips_bandfmt_isuint( in->BandFmt ) ) {
|
VipsImage *in;
|
||||||
if( im_copy( in, out ) )
|
VipsImage *out;
|
||||||
return( -1 );
|
} VipsHistPlot;
|
||||||
}
|
|
||||||
else if( vips_bandfmt_isint( in->BandFmt ) ) {
|
|
||||||
double min;
|
|
||||||
|
|
||||||
/* Move min up to 0.
|
typedef VipsOperationClass VipsHistPlotClass;
|
||||||
*/
|
|
||||||
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;
|
|
||||||
|
|
||||||
if( in->Xsize == 1 )
|
G_DEFINE_TYPE( VipsHistPlot, vips_hist_plot, VIPS_TYPE_OPERATION );
|
||||||
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 );
|
|
||||||
}
|
|
||||||
|
|
||||||
#define VERT( TYPE ) { \
|
#define VERT( TYPE ) { \
|
||||||
TYPE *p1 = (TYPE *) p; \
|
TYPE *p1 = (TYPE *) p; \
|
||||||
@ -131,31 +95,32 @@ plotalise( IMAGE *in, IMAGE *out )
|
|||||||
/* Generate function.
|
/* Generate function.
|
||||||
*/
|
*/
|
||||||
static int
|
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;
|
VipsImage *in = (VipsImage *) a;
|
||||||
Rect *r = &or->valid;
|
VipsRect *r = &or->valid;
|
||||||
int le = r->left;
|
int le = r->left;
|
||||||
int to = r->top;
|
int to = r->top;
|
||||||
int ri = IM_RECT_RIGHT( r );
|
int ri = VIPS_RECT_RIGHT( r );
|
||||||
int bo = IM_RECT_BOTTOM( r );
|
int bo = VIPS_RECT_BOTTOM( r );
|
||||||
int nb = in->Bands;
|
int nb = in->Bands;
|
||||||
|
|
||||||
int x, y, z;
|
int x, y, z;
|
||||||
|
|
||||||
for( y = to; y < bo; y++ ) {
|
for( y = to; y < bo; y++ ) {
|
||||||
VipsPel *q = IM_REGION_ADDR( or, le, y );
|
VipsPel *q = VIPS_REGION_ADDR( or, le, y );
|
||||||
VipsPel *p = IM_IMAGE_ADDR( in, 0, y );
|
VipsPel *p = VIPS_IMAGE_ADDR( in, 0, y );
|
||||||
|
|
||||||
switch( in->BandFmt ) {
|
switch( in->BandFmt ) {
|
||||||
case IM_BANDFMT_UCHAR: VERT( unsigned char ); break;
|
case VIPS_FORMAT_UCHAR: VERT( unsigned char ); break;
|
||||||
case IM_BANDFMT_CHAR: VERT( signed char ); break;
|
case VIPS_FORMAT_CHAR: VERT( signed char ); break;
|
||||||
case IM_BANDFMT_USHORT: VERT( unsigned short ); break;
|
case VIPS_FORMAT_USHORT: VERT( unsigned short ); break;
|
||||||
case IM_BANDFMT_SHORT: VERT( signed short ); break;
|
case VIPS_FORMAT_SHORT: VERT( signed short ); break;
|
||||||
case IM_BANDFMT_UINT: VERT( unsigned int ); break;
|
case VIPS_FORMAT_UINT: VERT( unsigned int ); break;
|
||||||
case IM_BANDFMT_INT: VERT( signed int ); break;
|
case VIPS_FORMAT_INT: VERT( signed int ); break;
|
||||||
case IM_BANDFMT_FLOAT: VERT( float ); break;
|
case VIPS_FORMAT_FLOAT: VERT( float ); break;
|
||||||
case IM_BANDFMT_DOUBLE: VERT( double ); break;
|
case VIPS_FORMAT_DOUBLE: VERT( double ); break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
g_assert_not_reached();
|
g_assert_not_reached();
|
||||||
@ -179,33 +144,34 @@ make_vert_gen( REGION *or, void *seq, void *a, void *b )
|
|||||||
/* Generate function.
|
/* Generate function.
|
||||||
*/
|
*/
|
||||||
static int
|
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;
|
VipsImage *in = (VipsImage *) a;
|
||||||
Rect *r = &or->valid;
|
VipsRect *r = &or->valid;
|
||||||
int le = r->left;
|
int le = r->left;
|
||||||
int to = r->top;
|
int to = r->top;
|
||||||
int ri = IM_RECT_RIGHT( r );
|
int ri = VIPS_RECT_RIGHT( r );
|
||||||
int bo = IM_RECT_BOTTOM( r );
|
int bo = VIPS_RECT_BOTTOM( r );
|
||||||
int nb = in->Bands;
|
int nb = in->Bands;
|
||||||
int lsk = IM_REGION_LSKIP( or );
|
int lsk = VIPS_REGION_LSKIP( or );
|
||||||
int ht = or->im->Ysize;
|
int ht = or->im->Ysize;
|
||||||
|
|
||||||
int x, y, z;
|
int x, y, z;
|
||||||
|
|
||||||
for( x = le; x < ri; x++ ) {
|
for( x = le; x < ri; x++ ) {
|
||||||
VipsPel *q = IM_REGION_ADDR( or, x, to );
|
VipsPel *q = VIPS_REGION_ADDR( or, x, to );
|
||||||
VipsPel *p = IM_IMAGE_ADDR( in, x, 0 );
|
VipsPel *p = VIPS_IMAGE_ADDR( in, x, 0 );
|
||||||
|
|
||||||
switch( in->BandFmt ) {
|
switch( in->BandFmt ) {
|
||||||
case IM_BANDFMT_UCHAR: HORZ( unsigned char ); break;
|
case VIPS_FORMAT_UCHAR: HORZ( unsigned char ); break;
|
||||||
case IM_BANDFMT_CHAR: HORZ( signed char ); break;
|
case VIPS_FORMAT_CHAR: HORZ( signed char ); break;
|
||||||
case IM_BANDFMT_USHORT: HORZ( unsigned short ); break;
|
case VIPS_FORMAT_USHORT: HORZ( unsigned short ); break;
|
||||||
case IM_BANDFMT_SHORT: HORZ( signed short ); break;
|
case VIPS_FORMAT_SHORT: HORZ( signed short ); break;
|
||||||
case IM_BANDFMT_UINT: HORZ( unsigned int ); break;
|
case VIPS_FORMAT_UINT: HORZ( unsigned int ); break;
|
||||||
case IM_BANDFMT_INT: HORZ( signed int ); break;
|
case VIPS_FORMAT_INT: HORZ( signed int ); break;
|
||||||
case IM_BANDFMT_FLOAT: HORZ( float ); break;
|
case VIPS_FORMAT_FLOAT: HORZ( float ); break;
|
||||||
case IM_BANDFMT_DOUBLE: HORZ( double ); break;
|
case VIPS_FORMAT_DOUBLE: HORZ( double ); break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
g_assert_not_reached();
|
g_assert_not_reached();
|
||||||
@ -215,26 +181,68 @@ make_horz_gen( REGION *or, void *seq, void *a, void *b )
|
|||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Plot image.
|
|
||||||
*/
|
|
||||||
static int
|
static int
|
||||||
plot( IMAGE *in, IMAGE *out )
|
vips_hist_plot_build( VipsObject *object )
|
||||||
{
|
{
|
||||||
double max;
|
VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object );
|
||||||
int tsize;
|
VipsHistPlot *plot = (VipsHistPlot *) object;
|
||||||
int xsize;
|
VipsImage **t = (VipsImage **) vips_object_local_array( object, 2 );
|
||||||
int ysize;
|
|
||||||
|
|
||||||
if( im_incheck( in ) ||
|
VipsImage *in;
|
||||||
im_poutcheck( out ) )
|
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 );
|
return( -1 );
|
||||||
|
|
||||||
/* Find range we will plot.
|
/* Find range we will plot.
|
||||||
*/
|
*/
|
||||||
if( im_max( in, &max ) )
|
if( vips_max( in, &max, NULL ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
g_assert( max >= 0 );
|
g_assert( max >= 0 );
|
||||||
if( in->BandFmt == IM_BANDFMT_UCHAR )
|
if( in->BandFmt == VIPS_FORMAT_UCHAR )
|
||||||
tsize = 256;
|
tsize = 256;
|
||||||
else
|
else
|
||||||
tsize = VIPS_CEIL( max );
|
tsize = VIPS_CEIL( max );
|
||||||
@ -247,80 +255,30 @@ plot( IMAGE *in, IMAGE *out )
|
|||||||
if( in->Xsize == 1 ) {
|
if( in->Xsize == 1 ) {
|
||||||
/* Vertical graph.
|
/* Vertical graph.
|
||||||
*/
|
*/
|
||||||
xsize = tsize;
|
width = tsize;
|
||||||
ysize = in->Ysize;
|
height = in->Ysize;
|
||||||
|
generate_fn = vips_hist_plot_vert_gen;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Horizontal graph.
|
/* Horizontal graph.
|
||||||
*/
|
*/
|
||||||
xsize = in->Xsize;
|
width = in->Xsize;
|
||||||
ysize = tsize;
|
height = tsize;
|
||||||
|
generate_fn = vips_hist_plot_horz_gen;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set image.
|
/* Set image.
|
||||||
*/
|
*/
|
||||||
im_initdesc( out, xsize, ysize, in->Bands,
|
vips_image_init_fields( plot->out, width, height, in->Bands,
|
||||||
IM_BBITS_BYTE, IM_BANDFMT_UCHAR,
|
VIPS_FORMAT_UCHAR, VIPS_CODING_NONE,
|
||||||
IM_CODING_NONE, IM_TYPE_HISTOGRAM, 1.0, 1.0, 0, 0 );
|
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( vips_image_generate( plot->out,
|
||||||
*/
|
NULL, generate_fn, NULL, in, NULL ) )
|
||||||
if( im_demand_hint( out, IM_ANY, NULL ) )
|
|
||||||
return( -1 );
|
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 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
@ -233,6 +233,8 @@ int vips__byteswap_bool( VipsImage *in, VipsImage **out, gboolean swap );
|
|||||||
char *vips__xml_properties( VipsImage *image );
|
char *vips__xml_properties( VipsImage *image );
|
||||||
|
|
||||||
void vips__cairo2rgba( guint32 *buf, int n );
|
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
|
#ifdef DEBUG_LEAK
|
||||||
extern GQuark vips__image_pixels_quark;
|
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,
|
VipsSaveable saveable, VipsBandFormat *format, VipsCoding *coding,
|
||||||
VipsArrayDouble *background );
|
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 );
|
int vips__image_intize( VipsImage *in, VipsImage **out );
|
||||||
|
|
||||||
void vips__reorder_init( void );
|
void vips__reorder_init( void );
|
||||||
|
@ -46,6 +46,8 @@
|
|||||||
* - include <time.h>, thanks nicola
|
* - include <time.h>, thanks nicola
|
||||||
* 30/6/09
|
* 30/6/09
|
||||||
* - move deprecated stuff to its own header
|
* - 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 <vips/video.h>
|
#include <vips/video.h>
|
||||||
#include <vips/cimg_funcs.h>
|
#include <vips/cimg_funcs.h>
|
||||||
|
|
||||||
/* This stuff is very, very old and should not be used by anyone now.
|
|
||||||
*/
|
|
||||||
#ifdef VIPS_ENABLE_ANCIENT
|
|
||||||
#include <vips/deprecated.h>
|
|
||||||
#endif /*VIPS_ENABLE_ANCIENT*/
|
|
||||||
|
|
||||||
/* Still in use, but can be turned off.
|
|
||||||
*/
|
|
||||||
#ifdef VIPS_ENABLE_DEPRECATED
|
|
||||||
#include <vips/vips7compat.h>
|
|
||||||
#include <vips/dispatch.h>
|
|
||||||
#include <vips/almostdeprecated.h>
|
|
||||||
#endif /*VIPS_ENABLE_DEPRECATED*/
|
|
||||||
|
|
||||||
/* We can't use _ here since this will be compiled by our clients and they may
|
/* We can't use _ here since this will be compiled by our clients and they may
|
||||||
* not have _().
|
* not have _().
|
||||||
*/
|
*/
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user