WIP - add extractor, generate snippet_data

This commit is contained in:
Stefan Fejes
2019-08-20 15:52:05 +02:00
parent 88084d3d30
commit cc8f1d8a7a
37396 changed files with 4588842 additions and 133 deletions

57
node_modules/sharp/vendor/include/vips/VError8.h generated vendored Normal file
View File

@ -0,0 +1,57 @@
// Header for error type
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_VERROR_H
#define VIPS_VERROR_H
#include <string>
#include <iosfwd>
#include <exception>
#include <vips/vips.h>
VIPS_NAMESPACE_START
class VIPS_CPLUSPLUS_API VError : public std::exception {
std::string _what;
public:
VError( std::string what ) : _what( what ) {}
VError() : _what( vips_error_buffer() ) {}
virtual ~VError() throw() {}
// Extract string
virtual const char *what() const throw() { return _what.c_str(); }
void ostream_print( std::ostream & ) const;
};
VIPS_NAMESPACE_END
#endif /*VIPS_VERROR_H*/

1042
node_modules/sharp/vendor/include/vips/VImage8.h generated vendored Normal file

File diff suppressed because it is too large Load Diff

64
node_modules/sharp/vendor/include/vips/VInterpolate8.h generated vendored Normal file
View File

@ -0,0 +1,64 @@
// VIPS interpolate wrapper
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_VINTERPOLATE_H
#define VIPS_VINTERPOLATE_H
#include <list>
#include <complex>
#include <vector>
#include <string.h>
#include <vips/vips.h>
VIPS_NAMESPACE_START
class VInterpolate : VObject
{
public:
VInterpolate( VipsInterpolate *interpolate, VSteal steal = STEAL ) :
VObject( (VipsObject *) interpolate, steal )
{
}
static
VInterpolate new_from_name( const char *name, VOption *options = 0 );
VipsInterpolate *
get_interpolate() const
{
return( (VipsInterpolate *) VObject::get_object() );
}
};
VIPS_NAMESPACE_END
#endif /*VIPS_VIMAGE_H*/

View File

@ -0,0 +1,299 @@
/* Old and broken stuff that we still enable by default, but don't document
* and certainly don't recommend.
*
* 30/6/09
* - from vips.h
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef IM_ALMOSTDEPRECATED_H
#define IM_ALMOSTDEPRECATED_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
/* Was public, now deprecated.
*/
typedef enum {
IM_BBITS_BYTE = 8,
IM_BBITS_SHORT = 16,
IM_BBITS_INT = 32,
IM_BBITS_FLOAT = 32,
IM_BBITS_COMPLEX = 64,
IM_BBITS_DOUBLE = 64,
IM_BBITS_DPCOMPLEX = 128
} VipsBBits;
/* Used to define a region of interest for im_extract() etc. Too boring to be
* public API, see im_extract_area() etc.
*/
typedef struct {
int xstart;
int ystart;
int xsize;
int ysize;
int chsel; /* 1 2 3 or 0, for r g b or all respectively
*(channel select) */
} IMAGE_BOX;
int im_extract( IMAGE *, IMAGE *, IMAGE_BOX * );
DOUBLEMASK *im_measure( IMAGE *im, IMAGE_BOX *box, int h, int v,
int *sel, int nsel, const char *name );
gboolean im_isuint( IMAGE *im );
gboolean im_isint( IMAGE *im );
gboolean im_isfloat( IMAGE *im );
gboolean im_isscalar( IMAGE *im );
gboolean im_iscomplex( IMAGE *im );
int im_c2ps( IMAGE *in, IMAGE *out );
int im_clip( IMAGE *in, IMAGE *out );
#define MASK_IDEAL_HIGHPASS IM_MASK_IDEAL_HIGHPASS
#define MASK_IDEAL_LOWPASS IM_MASK_IDEAL_LOWPASS
#define MASK_BUTTERWORTH_HIGHPASS IM_MASK_BUTTERWORTH_HIGHPASS
#define MASK_BUTTERWORTH_LOWPASS IM_MASK_BUTTERWORTH_LOWPASS
#define MASK_GAUSS_HIGHPASS IM_MASK_GAUSS_HIGHPASS
#define MASK_GAUSS_LOWPASS IM_MASK_GAUSS_LOWPASS
#define MASK_IDEAL_RINGPASS IM_MASK_IDEAL_RINGPASS
#define MASK_IDEAL_RINGREJECT IM_MASK_IDEAL_RINGREJECT
#define MASK_BUTTERWORTH_RINGPASS IM_MASK_BUTTERWORTH_RINGPASS
#define MASK_BUTTERWORTH_RINGREJECT IM_MASK_BUTTERWORTH_RINGREJECT
#define MASK_GAUSS_RINGPASS IM_MASK_GAUSS_RINGPASS
#define MASK_GAUSS_RINGREJECT IM_MASK_GAUSS_RINGREJECT
#define MASK_IDEAL_BANDPASS IM_MASK_IDEAL_BANDPASS
#define MASK_IDEAL_BANDREJECT IM_MASK_IDEAL_BANDREJECT
#define MASK_BUTTERWORTH_BANDPASS IM_MASK_BUTTERWORTH_BANDPASS
#define MASK_BUTTERWORTH_BANDREJECT IM_MASK_BUTTERWORTH_BANDREJECT
#define MASK_GAUSS_BANDPASS IM_MASK_GAUSS_BANDPASS
#define MASK_GAUSS_BANDREJECT IM_MASK_GAUSS_BANDREJECT
#define MASK_FRACTAL_FLT IM_MASK_FRACTAL_FLT
#define MaskType ImMaskType
/* Copy and swap types.
*/
typedef enum {
IM_ARCH_NATIVE,
IM_ARCH_BYTE_SWAPPED,
IM_ARCH_LSB_FIRST,
IM_ARCH_MSB_FIRST
} im_arch_type;
gboolean im_isnative( im_arch_type arch );
int im_copy_from( IMAGE *in, IMAGE *out, im_arch_type architecture );
/* Backwards compatibility macros.
*/
#define im_clear_error_string() im_error_clear()
#define im_errorstring() im_error_buffer()
/* Deprecated API.
*/
void im_errormsg( const char *fmt, ... )
__attribute__((format(printf, 1, 2)));
void im_verrormsg( const char *fmt, va_list ap );
void im_errormsg_system( int err, const char *fmt, ... )
__attribute__((format(printf, 2, 3)));
void im_diagnostics( const char *fmt, ... )
__attribute__((format(printf, 1, 2)));
void im_warning( const char *fmt, ... )
__attribute__((format(printf, 1, 2)));
int im_iterate( VipsImage *im,
VipsStartFn start, im_generate_fn generate, VipsStopFn stop,
void *a, void *b
);
/* Async rendering.
*/
int im_render_priority( VipsImage *in, VipsImage *out, VipsImage *mask,
int width, int height, int max,
int priority,
void (*notify)( VipsImage *, VipsRect *, void * ), void *client );
int im_cache( VipsImage *in, VipsImage *out, int width, int height, int max );
/* Deprecated operations.
*/
int im_cmulnorm( IMAGE *in1, IMAGE *in2, IMAGE *out );
int im_fav4( IMAGE **, IMAGE * );
int im_gadd( double, IMAGE *, double, IMAGE *, double, IMAGE *);
int im_litecor( IMAGE *, IMAGE *, IMAGE *, int, double );
int im_render_fade( IMAGE *in, IMAGE *out, IMAGE *mask,
int width, int height, int max,
int fps, int steps,
int priority,
void (*notify)( IMAGE *, VipsRect *, void * ), void *client );
int im_render( IMAGE *in, IMAGE *out, IMAGE *mask,
int width, int height, int max,
void (*notify)( IMAGE *, VipsRect *, void * ), void *client );
int im_cooc_matrix( IMAGE *im, IMAGE *m,
int xp, int yp, int xs, int ys, int dx, int dy, int flag );
int im_cooc_asm( IMAGE *m, double *asmoment );
int im_cooc_contrast( IMAGE *m, double *contrast );
int im_cooc_correlation( IMAGE *m, double *correlation );
int im_cooc_entropy( IMAGE *m, double *entropy );
int im_glds_matrix( IMAGE *im, IMAGE *m,
int xpos, int ypos, int xsize, int ysize, int dx, int dy );
int im_glds_asm( IMAGE *m, double *asmoment );
int im_glds_contrast( IMAGE *m, double *contrast );
int im_glds_entropy( IMAGE *m, double *entropy );
int im_glds_mean( IMAGE *m, double *mean );
int im_dif_std(IMAGE *im, int xpos, int ypos, int xsize, int ysize, int dx, int dy, double *pmean, double *pstd);
int im_simcontr( IMAGE *out, int xsize, int ysize );
int im_spatres( IMAGE *in, IMAGE *out, int step );
int im_stretch3( IMAGE *in, IMAGE *out, double dx, double dy );
/* Renamed operations.
*/
/* arithmetic
*/
int im_remainderconst_vec( IMAGE *in, IMAGE *out, int n, double *c );
/* boolean
*/
int im_andconst( IMAGE *, IMAGE *, double );
int im_and_vec( IMAGE *, IMAGE *, int, double * );
int im_orconst( IMAGE *, IMAGE *, double );
int im_or_vec( IMAGE *, IMAGE *, int, double * );
int im_eorconst( IMAGE *, IMAGE *, double );
int im_eor_vec( IMAGE *, IMAGE *, int, double * );
/* mosaicing
*/
int im_affine( IMAGE *in, IMAGE *out,
double a, double b, double c, double d, double dx, double dy,
int ox, int oy, int ow, int oh );
int im_similarity( IMAGE *in, IMAGE *out,
double a, double b, double dx, double dy );
int im_similarity_area( IMAGE *in, IMAGE *out,
double a, double b, double dx, double dy,
int ox, int oy, int ow, int oh );
/* colour
*/
int im_icc_export( IMAGE *in, IMAGE *out,
const char *output_profile_filename, int intent );
/* conversion
*/
int im_clip2dcm( IMAGE *in, IMAGE *out );
int im_clip2cm( IMAGE *in, IMAGE *out );
int im_clip2us( IMAGE *in, IMAGE *out );
int im_clip2ui( IMAGE *in, IMAGE *out );
int im_clip2s( IMAGE *in, IMAGE *out );
int im_clip2i( IMAGE *in, IMAGE *out );
int im_clip2d( IMAGE *in, IMAGE *out );
int im_clip2f( IMAGE *in, IMAGE *out );
int im_clip2c( IMAGE *in, IMAGE *out );
int im_slice( IMAGE *in, IMAGE *out, double, double );
int im_thresh( IMAGE *in, IMAGE *out, double );
int im_print( const char *message );
int im_convsub( IMAGE *in, IMAGE *out, INTMASK *mask, int xskip, int yskip );
int im_bernd( const char *tiffname, int x, int y, int w, int h );
int im_resize_linear( IMAGE *, IMAGE *, int, int );
int im_convf( IMAGE *in, IMAGE *out, DOUBLEMASK *mask );
int im_convsepf( IMAGE *in, IMAGE *out, DOUBLEMASK *mask );
int im_conv_raw( IMAGE *in, IMAGE *out, INTMASK *mask );
int im_convf_raw( IMAGE *in, IMAGE *out, DOUBLEMASK *mask );
int im_convsep_raw( IMAGE *in, IMAGE *out, INTMASK *mask );
int im_convsepf_raw( IMAGE *in, IMAGE *out, DOUBLEMASK *mask );
int im_fastcor_raw( IMAGE *in, IMAGE *ref, IMAGE *out );
int im_spcor_raw( IMAGE *in, IMAGE *ref, IMAGE *out );
int im_gradcor_raw( IMAGE *in, IMAGE *ref, IMAGE *out );
int im_contrast_surface_raw( IMAGE *in, IMAGE *out,
int half_win_size, int spacing );
int im_stdif_raw( IMAGE *in, IMAGE *out,
double a, double m0, double b, double s0, int xwin, int ywin );
int im_lhisteq_raw( IMAGE *in, IMAGE *out, int xwin, int ywin );
int im_erode_raw( IMAGE *in, IMAGE *out, INTMASK *m );
int im_dilate_raw( IMAGE *in, IMAGE *out, INTMASK *m );
int im_rank_raw( IMAGE *in, IMAGE *out, int xsize, int ysize, int order );
/* inplace
*/
int im_circle( IMAGE *im, int cx, int cy, int radius, int intensity );
int im_line( IMAGE *, int, int, int, int, int );
int im_segment( IMAGE *test, IMAGE *mask, int *segments );
int im_paintrect( IMAGE *im, VipsRect *r, PEL *ink );
int im_insertplace( IMAGE *main, IMAGE *sub, int x, int y );
int im_flood_copy( IMAGE *in, IMAGE *out, int x, int y, PEL *ink );
int im_flood_blob_copy( IMAGE *in, IMAGE *out, int x, int y, PEL *ink );
int im_flood_other_copy( IMAGE *test, IMAGE *mark, IMAGE *out,
int x, int y, int serial );
int im_flood( IMAGE *im, int x, int y, PEL *ink, VipsRect *dout );
int im_flood_blob( IMAGE *im, int x, int y, PEL *ink, VipsRect *dout );
int im_flood_other( IMAGE *test, IMAGE *mark,
int x, int y, int serial, VipsRect *dout );
int im_fastline( IMAGE *im, int x1, int y1, int x2, int y2, PEL *pel );
int im_fastlineuser( IMAGE *im,
int x1, int y1, int x2, int y2,
VipsPlotFn fn, void *client1, void *client2, void *client3 );
int im_plotmask( IMAGE *im, int ix, int iy, PEL *ink, PEL *mask, VipsRect *r );
int im_readpoint( IMAGE *im, int x, int y, PEL *pel );
int im_plotpoint( IMAGE *im, int x, int y, PEL *pel );
int im_smudge( IMAGE *image, int ix, int iy, VipsRect *r );
int im_smear( IMAGE *im, int ix, int iy, VipsRect *r );
void vips_warn( const char *domain, const char *fmt, ... )
__attribute__((format(printf, 2, 3)));
void vips_vwarn( const char *domain, const char *fmt, va_list ap );
void vips_info_set( gboolean info );
void vips_info( const char *domain, const char *fmt, ... )
__attribute__((format(printf, 2, 3)));
void vips_vinfo( const char *domain, const char *fmt, va_list ap );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*IM_ALMOSTDEPRECATED_H*/

412
node_modules/sharp/vendor/include/vips/arithmetic.h generated vendored Normal file
View File

@ -0,0 +1,412 @@
/* Headers for arithmetic
*
* 30/6/09
* - from proto.h
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef IM_ARITHMETIC_H
#define IM_ARITHMETIC_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
/**
* VipsOperationMath:
* @VIPS_OPERATION_MATH_SIN: sin(), angles in degrees
* @VIPS_OPERATION_MATH_COS: cos(), angles in degrees
* @VIPS_OPERATION_MATH_TAN: tan(), angles in degrees
* @VIPS_OPERATION_MATH_ASIN: asin(), angles in degrees
* @VIPS_OPERATION_MATH_ACOS: acos(), angles in degrees
* @VIPS_OPERATION_MATH_ATAN: atan(), angles in degrees
* @VIPS_OPERATION_MATH_LOG: log base e
* @VIPS_OPERATION_MATH_LOG10: log base 10
* @VIPS_OPERATION_MATH_EXP: e to the something
* @VIPS_OPERATION_MATH_EXP10: 10 to the something
*
* See also: vips_math().
*/
typedef enum {
VIPS_OPERATION_MATH_SIN,
VIPS_OPERATION_MATH_COS,
VIPS_OPERATION_MATH_TAN,
VIPS_OPERATION_MATH_ASIN,
VIPS_OPERATION_MATH_ACOS,
VIPS_OPERATION_MATH_ATAN,
VIPS_OPERATION_MATH_LOG,
VIPS_OPERATION_MATH_LOG10,
VIPS_OPERATION_MATH_EXP,
VIPS_OPERATION_MATH_EXP10,
VIPS_OPERATION_MATH_LAST
} VipsOperationMath;
/**
* VipsOperationMath2:
* @VIPS_OPERATION_MATH2_POW: pow( left, right )
* @VIPS_OPERATION_MATH2_WOP: pow( right, left )
*
* See also: vips_math().
*/
typedef enum {
VIPS_OPERATION_MATH2_POW,
VIPS_OPERATION_MATH2_WOP,
VIPS_OPERATION_MATH2_LAST
} VipsOperationMath2;
/**
* VipsOperationRound:
* @VIPS_OPERATION_ROUND_RINT: round to nearest
* @VIPS_OPERATION_ROUND_FLOOR: largest integral value not greater than
* @VIPS_OPERATION_ROUND_CEIL: the smallest integral value not less than
*
* See also: vips_round().
*/
typedef enum {
VIPS_OPERATION_ROUND_RINT,
VIPS_OPERATION_ROUND_CEIL,
VIPS_OPERATION_ROUND_FLOOR,
VIPS_OPERATION_ROUND_LAST
} VipsOperationRound;
/**
* VipsOperationRelational:
* @VIPS_OPERATION_RELATIONAL_EQUAL: ==
* @VIPS_OPERATION_RELATIONAL_NOTEQ: !=
* @VIPS_OPERATION_RELATIONAL_LESS: <
* @VIPS_OPERATION_RELATIONAL_LESSEQ: <=
* @VIPS_OPERATION_RELATIONAL_MORE: >
* @VIPS_OPERATION_RELATIONAL_MOREEQ: >=
*
* See also: vips_relational().
*/
typedef enum {
VIPS_OPERATION_RELATIONAL_EQUAL,
VIPS_OPERATION_RELATIONAL_NOTEQ,
VIPS_OPERATION_RELATIONAL_LESS,
VIPS_OPERATION_RELATIONAL_LESSEQ,
VIPS_OPERATION_RELATIONAL_MORE,
VIPS_OPERATION_RELATIONAL_MOREEQ,
VIPS_OPERATION_RELATIONAL_LAST
} VipsOperationRelational;
/**
* VipsOperationBoolean:
* @VIPS_OPERATION_BOOLEAN_AND: &
* @VIPS_OPERATION_BOOLEAN_OR: |
* @VIPS_OPERATION_BOOLEAN_EOR: ^
* @VIPS_OPERATION_BOOLEAN_LSHIFT: >>
* @VIPS_OPERATION_BOOLEAN_RSHIFT: <<
*
* See also: vips_boolean().
*/
typedef enum {
VIPS_OPERATION_BOOLEAN_AND,
VIPS_OPERATION_BOOLEAN_OR,
VIPS_OPERATION_BOOLEAN_EOR,
VIPS_OPERATION_BOOLEAN_LSHIFT,
VIPS_OPERATION_BOOLEAN_RSHIFT,
VIPS_OPERATION_BOOLEAN_LAST
} VipsOperationBoolean;
/**
* VipsOperationComplex:
* @VIPS_OPERATION_COMPLEX_POLAR: convert to polar coordinates
* @VIPS_OPERATION_COMPLEX_RECT: convert to rectangular coordinates
* @VIPS_OPERATION_COMPLEX_CONJ: complex conjugate
*
* See also: vips_complex().
*/
typedef enum {
VIPS_OPERATION_COMPLEX_POLAR,
VIPS_OPERATION_COMPLEX_RECT,
VIPS_OPERATION_COMPLEX_CONJ,
VIPS_OPERATION_COMPLEX_LAST
} VipsOperationComplex;
/**
* VipsOperationComplex2:
* @VIPS_OPERATION_COMPLEX2_CROSS_PHASE: convert to polar coordinates
*
* See also: vips_complex2().
*/
typedef enum {
VIPS_OPERATION_COMPLEX2_CROSS_PHASE,
VIPS_OPERATION_COMPLEX2_LAST
} VipsOperationComplex2;
/**
* VipsOperationComplexget:
* @VIPS_OPERATION_COMPLEXGET_REAL: get real component
* @VIPS_OPERATION_COMPLEXGET_IMAG: get imaginary component
*
* See also: vips_complexget().
*/
typedef enum {
VIPS_OPERATION_COMPLEXGET_REAL,
VIPS_OPERATION_COMPLEXGET_IMAG,
VIPS_OPERATION_COMPLEXGET_LAST
} VipsOperationComplexget;
int vips_add( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel));
int vips_sum( VipsImage **in, VipsImage **out, int n, ... )
__attribute__((sentinel));
int vips_subtract( VipsImage *in1, VipsImage *in2, VipsImage **out, ... )
__attribute__((sentinel));
int vips_multiply( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel));
int vips_divide( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel));
int vips_linear( VipsImage *in, VipsImage **out,
double *a, double *b, int n, ... )
__attribute__((sentinel));
int vips_linear1( VipsImage *in, VipsImage **out, double a, double b, ... )
__attribute__((sentinel));
int vips_remainder( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel));
int vips_remainder_const( VipsImage *in, VipsImage **out,
double *c, int n, ... )
__attribute__((sentinel));
int vips_remainder_const1( VipsImage *in, VipsImage **out,
double c, ... )
__attribute__((sentinel));
int vips_invert( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_abs( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_sign( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_round( VipsImage *in, VipsImage **out, VipsOperationRound round, ... )
__attribute__((sentinel));
int vips_floor( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_ceil( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_rint( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_math( VipsImage *in, VipsImage **out,
VipsOperationMath math, ... )
__attribute__((sentinel));
int vips_sin( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_cos( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_tan( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_asin( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_acos( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_atan( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_exp( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_exp10( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_log( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_log10( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_complex( VipsImage *in, VipsImage **out,
VipsOperationComplex cmplx, ... )
__attribute__((sentinel));
int vips_polar( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_rect( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_conj( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_complex2( VipsImage *left, VipsImage *right, VipsImage **out,
VipsOperationComplex2 cmplx, ... )
__attribute__((sentinel));
int vips_cross_phase( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel));
int vips_complexget( VipsImage *in, VipsImage **out,
VipsOperationComplexget get, ... )
__attribute__((sentinel));
int vips_real( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_imag( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_complexform( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel));
int vips_relational( VipsImage *left, VipsImage *right, VipsImage **out,
VipsOperationRelational relational, ... )
__attribute__((sentinel));
int vips_equal( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel));
int vips_notequal( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel));
int vips_less( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel));
int vips_lesseq( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel));
int vips_more( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel));
int vips_moreeq( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel));
int vips_relational_const( VipsImage *in, VipsImage **out,
VipsOperationRelational relational, double *c, int n, ... )
__attribute__((sentinel));
int vips_equal_const( VipsImage *in, VipsImage **out, double *c, int n, ... )
__attribute__((sentinel));
int vips_notequal_const( VipsImage *in, VipsImage **out, double *c, int n, ... )
__attribute__((sentinel));
int vips_less_const( VipsImage *in, VipsImage **out, double *c, int n, ... )
__attribute__((sentinel));
int vips_lesseq_const( VipsImage *in, VipsImage **out, double *c, int n, ... )
__attribute__((sentinel));
int vips_more_const( VipsImage *in, VipsImage **out, double *c, int n, ... )
__attribute__((sentinel));
int vips_moreeq_const( VipsImage *in, VipsImage **out, double *c, int n, ... )
__attribute__((sentinel));
int vips_relational_const1( VipsImage *in, VipsImage **out,
VipsOperationRelational relational, double c, ... )
__attribute__((sentinel));
int vips_equal_const1( VipsImage *in, VipsImage **out, double c, ... )
__attribute__((sentinel));
int vips_notequal_const1( VipsImage *in, VipsImage **out, double c, ... )
__attribute__((sentinel));
int vips_less_const1( VipsImage *in, VipsImage **out, double c, ... )
__attribute__((sentinel));
int vips_lesseq_const1( VipsImage *in, VipsImage **out, double c, ... )
__attribute__((sentinel));
int vips_more_const1( VipsImage *in, VipsImage **out, double c, ... )
__attribute__((sentinel));
int vips_moreeq_const1( VipsImage *in, VipsImage **out, double c, ... )
__attribute__((sentinel));
int vips_boolean( VipsImage *left, VipsImage *right, VipsImage **out,
VipsOperationBoolean boolean, ... )
__attribute__((sentinel));
int vips_andimage( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel));
int vips_orimage( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel));
int vips_eorimage( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel));
int vips_lshift( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel));
int vips_rshift( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel));
int vips_boolean_const( VipsImage *in, VipsImage **out,
VipsOperationBoolean boolean, double *c, int n, ... )
__attribute__((sentinel));
int vips_andimage_const( VipsImage *in, VipsImage **out, double *c, int n, ... )
__attribute__((sentinel));
int vips_orimage_const( VipsImage *in, VipsImage **out, double *c, int n, ... )
__attribute__((sentinel));
int vips_eorimage_const( VipsImage *in, VipsImage **out, double *c, int n, ... )
__attribute__((sentinel));
int vips_lshift_const( VipsImage *in, VipsImage **out, double *c, int n, ... )
__attribute__((sentinel));
int vips_rshift_const( VipsImage *in, VipsImage **out, double *c, int n, ... )
__attribute__((sentinel));
int vips_boolean_const1( VipsImage *in, VipsImage **out,
VipsOperationBoolean boolean, double c, ... )
__attribute__((sentinel));
int vips_andimage_const1( VipsImage *in, VipsImage **out, double c, ... )
__attribute__((sentinel));
int vips_orimage_const1( VipsImage *in, VipsImage **out, double c, ... )
__attribute__((sentinel));
int vips_eorimage_const1( VipsImage *in, VipsImage **out, double c, ... )
__attribute__((sentinel));
int vips_lshift_const1( VipsImage *in, VipsImage **out, double c, ... )
__attribute__((sentinel));
int vips_rshift_const1( VipsImage *in, VipsImage **out, double c, ... )
__attribute__((sentinel));
int vips_math2( VipsImage *left, VipsImage *right, VipsImage **out,
VipsOperationMath2 math2, ... )
__attribute__((sentinel));
int vips_pow( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel));
int vips_wop( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel));
int vips_math2_const( VipsImage *in, VipsImage **out,
VipsOperationMath2 math2, double *c, int n, ... )
__attribute__((sentinel));
int vips_pow_const( VipsImage *in, VipsImage **out, double *c, int n, ... )
__attribute__((sentinel));
int vips_wop_const( VipsImage *in, VipsImage **out, double *c, int n, ... )
__attribute__((sentinel));
int vips_math2_const1( VipsImage *in, VipsImage **out,
VipsOperationMath2 math2, double c, ... )
__attribute__((sentinel));
int vips_pow_const1( VipsImage *in, VipsImage **out, double c, ... )
__attribute__((sentinel));
int vips_wop_const1( VipsImage *in, VipsImage **out, double c, ... )
__attribute__((sentinel));
int vips_avg( VipsImage *in, double *out, ... )
__attribute__((sentinel));
int vips_deviate( VipsImage *in, double *out, ... )
__attribute__((sentinel));
int vips_min( VipsImage *in, double *out, ... )
__attribute__((sentinel));
int vips_max( VipsImage *in, double *out, ... )
__attribute__((sentinel));
int vips_stats( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_measure( VipsImage *in, VipsImage **out, int h, int v, ... )
__attribute__((sentinel));
int vips_find_trim( VipsImage *in,
int *left, int *top, int *width, int *height, ... )
__attribute__((sentinel));
int vips_getpoint( VipsImage *in, double **vector, int *n, int x, int y, ... )
__attribute__((sentinel));
int vips_hist_find( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_hist_find_ndim( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_hist_find_indexed( VipsImage *in, VipsImage *index,
VipsImage **out, ... )
__attribute__((sentinel));
int vips_hough_line( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_hough_circle( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_project( VipsImage *in, VipsImage **columns, VipsImage **rows, ... )
__attribute__((sentinel));
int vips_profile( VipsImage *in, VipsImage **columns, VipsImage **rows, ... )
__attribute__((sentinel));
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*IM_ARITHMETIC_H*/

78
node_modules/sharp/vendor/include/vips/basic.h generated vendored Normal file
View File

@ -0,0 +1,78 @@
/* A few basic types needed everywhere.
*
* 27/10/11
* - from type.h
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_BASIC_H
#define VIPS_BASIC_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
/**
* VipsPel:
*
* A picture element. Cast this to whatever the associated VipsBandFormat says
* to get the value.
*/
typedef unsigned char VipsPel;
/* Also used for eg. vips_local() and friends.
*/
typedef int (*VipsCallbackFn)( void *a, void *b );
/* Like GFunc, but return a value.
*/
typedef void *(*VipsSListMap2Fn)( void *item,
void *a, void *b );
typedef void *(*VipsSListMap4Fn)( void *item,
void *a, void *b, void *c, void *d );
typedef void *(*VipsSListFold2Fn)( void *item,
void *a, void *b, void *c );
typedef enum {
VIPS_PRECISION_INTEGER,
VIPS_PRECISION_FLOAT,
VIPS_PRECISION_APPROXIMATE,
VIPS_PRECISION_LAST
} VipsPrecision;
/* Just for testing.
*/
char *vips_path_filename7( const char *path );
char *vips_path_mode7( const char *path );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_BASIC_H*/

92
node_modules/sharp/vendor/include/vips/buf.h generated vendored Normal file
View File

@ -0,0 +1,92 @@
/* A static string buffer, with overflow protection.
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_BUF_H
#define VIPS_BUF_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#include <vips/vips.h>
/* A string in the process of being written to ... multiple calls to
* vips_buf_append add to it. On overflow append "..." and block further
* writes.
*/
typedef struct _VipsBuf {
/* All fields are private.
*/
/*< private >*/
char *base; /* String base */
int mx; /* Maximum length */
int i; /* Current write point */
gboolean full; /* String has filled, block writes */
int lasti; /* For read-recent */
gboolean dynamic; /* We own the string with malloc() */
} VipsBuf;
#define VIPS_BUF_STATIC( TEXT ) \
{ &TEXT[0], sizeof( TEXT ), 0, FALSE, 0, FALSE }
/* Init and append to one of the above.
*/
void vips_buf_rewind( VipsBuf *buf );
void vips_buf_destroy( VipsBuf *buf );
void vips_buf_init( VipsBuf *buf );
void vips_buf_set_static( VipsBuf *buf, char *base, int mx );
void vips_buf_set_dynamic( VipsBuf *buf, int mx );
void vips_buf_init_static( VipsBuf *buf, char *base, int mx );
void vips_buf_init_dynamic( VipsBuf *buf, int mx );
gboolean vips_buf_appendns( VipsBuf *buf, const char *str, int sz );
gboolean vips_buf_appends( VipsBuf *buf, const char *str );
gboolean vips_buf_appendf( VipsBuf *buf, const char *fmt, ... )
__attribute__((format(printf, 2, 3)));
gboolean vips_buf_vappendf( VipsBuf *buf, const char *fmt, va_list ap );
gboolean vips_buf_appendc( VipsBuf *buf, char ch );
gboolean vips_buf_appendsc( VipsBuf *buf, gboolean quote, const char *str );
gboolean vips_buf_appendgv( VipsBuf *buf, GValue *value );
gboolean vips_buf_append_size( VipsBuf *buf, size_t n );
gboolean vips_buf_removec( VipsBuf *buf, char ch );
gboolean vips_buf_change( VipsBuf *buf, const char *o, const char *n );
gboolean vips_buf_is_empty( VipsBuf *buf );
gboolean vips_buf_is_full( VipsBuf *buf );
const char *vips_buf_all( VipsBuf *buf );
const char *vips_buf_firstline( VipsBuf *buf );
gboolean vips_buf_appendg( VipsBuf *buf, double g );
gboolean vips_buf_appendd( VipsBuf *buf, int d );
int vips_buf_len( VipsBuf *buf );
#endif /*VIPS_BUF_H*/
#ifdef __cplusplus
}
#endif /*__cplusplus*/

51
node_modules/sharp/vendor/include/vips/cimg_funcs.h generated vendored Normal file
View File

@ -0,0 +1,51 @@
/* cimg_funcs.h
*
* 20/9/09
* - from proto.h
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef IM_CIMG_FUNCS_H
#define IM_CIMG_FUNCS_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#include <vips/vips.h>
int vips_gmic( VipsImage **in, VipsImage **out, int n,
int padding, double x_scale, double y_scale, const char *command, ... )
__attribute__((sentinel));
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*IM_CIMG_FUNCS_H*/

235
node_modules/sharp/vendor/include/vips/colour.h generated vendored Normal file
View File

@ -0,0 +1,235 @@
/* Definitions for VIPS colour package.
*
* J.Cupitt, 8/4/93
* 15/7/96 JC
* - C++ stuff added
* 20/2/98 JC
* - new display calibration added
* 26/9/05
* - added IM_ prefix to colour temps
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_COLOUR_H
#define VIPS_COLOUR_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
/* Areas under curves for Dxx. 2 degree observer.
*/
#define VIPS_D93_X0 (89.7400)
#define VIPS_D93_Y0 (100.0)
#define VIPS_D93_Z0 (130.7700)
#define VIPS_D75_X0 (94.9682)
#define VIPS_D75_Y0 (100.0)
#define VIPS_D75_Z0 (122.5710)
/* D65 temp 6504.
*/
#define VIPS_D65_X0 (95.0470)
#define VIPS_D65_Y0 (100.0)
#define VIPS_D65_Z0 (108.8827)
#define VIPS_D55_X0 (95.6831)
#define VIPS_D55_Y0 (100.0)
#define VIPS_D55_Z0 (92.0871)
#define VIPS_D50_X0 (96.4250)
#define VIPS_D50_Y0 (100.0)
#define VIPS_D50_Z0 (82.4680)
/* A temp 2856k.
*/
#define VIPS_A_X0 (109.8503)
#define VIPS_A_Y0 (100.0)
#define VIPS_A_Z0 (35.5849)
/* B temp 4874k.
*/
#define VIPS_B_X0 (99.0720)
#define VIPS_B_Y0 (100.0)
#define VIPS_B_Z0 (85.2230)
/* C temp 6774k.
*/
#define VIPS_C_X0 (98.0700)
#define VIPS_C_Y0 (100.0)
#define VIPS_C_Z0 (118.2300)
#define VIPS_E_X0 (100.0)
#define VIPS_E_Y0 (100.0)
#define VIPS_E_Z0 (100.0)
#define VIPS_D3250_X0 (105.6590)
#define VIPS_D3250_Y0 (100.0)
#define VIPS_D3250_Z0 (45.8501)
typedef enum {
VIPS_INTENT_PERCEPTUAL = 0,
VIPS_INTENT_RELATIVE,
VIPS_INTENT_SATURATION,
VIPS_INTENT_ABSOLUTE,
VIPS_INTENT_LAST
} VipsIntent;
typedef enum {
VIPS_PCS_LAB,
VIPS_PCS_XYZ,
VIPS_PCS_LAST
} VipsPCS;
gboolean vips_colourspace_issupported( const VipsImage *image );
int vips_colourspace( VipsImage *in, VipsImage **out,
VipsInterpretation space, ... )
__attribute__((sentinel));
int vips_LabQ2sRGB( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_rad2float( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_float2rad( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_LabS2LabQ( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_LabQ2LabS( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_LabQ2Lab( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_Lab2LabQ( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_LCh2Lab( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_Lab2LCh( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_Yxy2Lab( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_CMC2XYZ( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_Lab2XYZ( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_XYZ2Lab( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_XYZ2scRGB( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_scRGB2sRGB( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_scRGB2BW( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_sRGB2scRGB( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_scRGB2XYZ( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_HSV2sRGB( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_sRGB2HSV( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_LCh2CMC( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_CMC2LCh( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_XYZ2Yxy( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_Yxy2XYZ( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_LabS2Lab( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_Lab2LabS( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_icc_present( void );
int vips_icc_transform( VipsImage *in, VipsImage **out,
const char *output_profile, ... )
__attribute__((sentinel));
int vips_icc_import( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_icc_export( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_icc_ac2rc( VipsImage *in, VipsImage **out,
const char *profile_filename );
gboolean vips_icc_is_compatible_profile( VipsImage *image,
void *data, size_t data_length );
int vips_dE76( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel));
int vips_dE00( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel));
int vips_dECMC( VipsImage *left, VipsImage *right, VipsImage **out, ... )
__attribute__((sentinel));
void vips_col_Lab2XYZ( float L, float a, float b,
float *X, float *Y, float *Z );
void vips_col_XYZ2Lab( float X, float Y, float Z,
float *L, float *a, float *b );
double vips_col_ab2h( double a, double b );
void vips_col_ab2Ch( float a, float b, float *C, float *h );
void vips_col_Ch2ab( float C, float h, float *a, float *b );
float vips_col_L2Lcmc( float L );
float vips_col_C2Ccmc( float C );
float vips_col_Ch2hcmc( float C, float h );
void vips_col_make_tables_CMC( void );
float vips_col_Lcmc2L( float Lcmc );
float vips_col_Ccmc2C( float Ccmc );
float vips_col_Chcmc2h( float C, float hcmc );
int vips_col_sRGB2scRGB_8( int r, int g, int b, float *R, float *G, float *B );
int vips_col_sRGB2scRGB_16( int r, int g, int b, float *R, float *G, float *B );
int vips_col_sRGB2scRGB_8_noclip( int r, int g, int b,
float *R, float *G, float *B );
int vips_col_sRGB2scRGB_16_noclip( int r, int g, int b,
float *R, float *G, float *B );
int vips_col_scRGB2XYZ( float R, float G, float B,
float *X, float *Y, float *Z );
int vips_col_XYZ2scRGB( float X, float Y, float Z,
float *R, float *G, float *B );
int vips_col_scRGB2sRGB_8( float R, float G, float B,
int *r, int *g, int *b, int *og );
int vips_col_scRGB2sRGB_16( float R, float G, float B,
int *r, int *g, int *b, int *og );
int vips_col_scRGB2BW_16( float R, float G, float B, int *g, int *og );
int vips_col_scRGB2BW_8( float R, float G, float B, int *g, int *og );
float vips_pythagoras( float L1, float a1, float b1,
float L2, float a2, float b2 );
float vips_col_dE00(
float L1, float a1, float b1, float L2, float a2, float b2 );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_COLOUR_H*/

287
node_modules/sharp/vendor/include/vips/conversion.h generated vendored Normal file
View File

@ -0,0 +1,287 @@
/* conversion.h
*
* 20/9/09
* - from proto.h
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_CONVERSION_H
#define VIPS_CONVERSION_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
typedef enum {
VIPS_EXTEND_BLACK,
VIPS_EXTEND_COPY,
VIPS_EXTEND_REPEAT,
VIPS_EXTEND_MIRROR,
VIPS_EXTEND_WHITE,
VIPS_EXTEND_BACKGROUND,
VIPS_EXTEND_LAST
} VipsExtend;
typedef enum {
VIPS_COMPASS_DIRECTION_CENTRE,
VIPS_COMPASS_DIRECTION_NORTH,
VIPS_COMPASS_DIRECTION_EAST,
VIPS_COMPASS_DIRECTION_SOUTH,
VIPS_COMPASS_DIRECTION_WEST,
VIPS_COMPASS_DIRECTION_NORTH_EAST,
VIPS_COMPASS_DIRECTION_SOUTH_EAST,
VIPS_COMPASS_DIRECTION_SOUTH_WEST,
VIPS_COMPASS_DIRECTION_NORTH_WEST,
VIPS_COMPASS_DIRECTION_LAST
} VipsCompassDirection;
typedef enum {
VIPS_DIRECTION_HORIZONTAL,
VIPS_DIRECTION_VERTICAL,
VIPS_DIRECTION_LAST
} VipsDirection;
typedef enum {
VIPS_ALIGN_LOW,
VIPS_ALIGN_CENTRE,
VIPS_ALIGN_HIGH,
VIPS_ALIGN_LAST
} VipsAlign;
typedef enum {
VIPS_ANGLE_D0,
VIPS_ANGLE_D90,
VIPS_ANGLE_D180,
VIPS_ANGLE_D270,
VIPS_ANGLE_LAST
} VipsAngle;
typedef enum {
VIPS_ANGLE45_D0,
VIPS_ANGLE45_D45,
VIPS_ANGLE45_D90,
VIPS_ANGLE45_D135,
VIPS_ANGLE45_D180,
VIPS_ANGLE45_D225,
VIPS_ANGLE45_D270,
VIPS_ANGLE45_D315,
VIPS_ANGLE45_LAST
} VipsAngle45;
typedef enum {
VIPS_INTERESTING_NONE,
VIPS_INTERESTING_CENTRE,
VIPS_INTERESTING_ENTROPY,
VIPS_INTERESTING_ATTENTION,
VIPS_INTERESTING_LAST
} VipsInteresting;
typedef enum {
VIPS_BLEND_MODE_CLEAR,
VIPS_BLEND_MODE_SOURCE,
VIPS_BLEND_MODE_OVER,
VIPS_BLEND_MODE_IN,
VIPS_BLEND_MODE_OUT,
VIPS_BLEND_MODE_ATOP,
VIPS_BLEND_MODE_DEST,
VIPS_BLEND_MODE_DEST_OVER,
VIPS_BLEND_MODE_DEST_IN,
VIPS_BLEND_MODE_DEST_OUT,
VIPS_BLEND_MODE_DEST_ATOP,
VIPS_BLEND_MODE_XOR,
VIPS_BLEND_MODE_ADD,
VIPS_BLEND_MODE_SATURATE,
VIPS_BLEND_MODE_MULTIPLY,
VIPS_BLEND_MODE_SCREEN,
VIPS_BLEND_MODE_OVERLAY,
VIPS_BLEND_MODE_DARKEN,
VIPS_BLEND_MODE_LIGHTEN,
VIPS_BLEND_MODE_COLOUR_DODGE,
VIPS_BLEND_MODE_COLOUR_BURN,
VIPS_BLEND_MODE_HARD_LIGHT,
VIPS_BLEND_MODE_SOFT_LIGHT,
VIPS_BLEND_MODE_DIFFERENCE,
VIPS_BLEND_MODE_EXCLUSION,
VIPS_BLEND_MODE_LAST
} VipsBlendMode;
int vips_copy( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_tilecache( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_linecache( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_sequential( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_cache( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_copy_file( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_embed( VipsImage *in, VipsImage **out,
int x, int y, int width, int height, ... )
__attribute__((sentinel));
int vips_gravity( VipsImage *in, VipsImage **out,
VipsCompassDirection direction, int width, int height, ... )
__attribute__((sentinel));
int vips_flip( VipsImage *in, VipsImage **out, VipsDirection direction, ... )
__attribute__((sentinel));
int vips_insert( VipsImage *main, VipsImage *sub, VipsImage **out,
int x, int y, ... )
__attribute__((sentinel));
int vips_join( VipsImage *in1, VipsImage *in2, VipsImage **out,
VipsDirection direction, ... )
__attribute__((sentinel));
int vips_arrayjoin( VipsImage **in, VipsImage **out, int n, ... )
__attribute__((sentinel));
int vips_extract_area( VipsImage *in, VipsImage **out,
int left, int top, int width, int height, ... )
__attribute__((sentinel));
int vips_crop( VipsImage *in, VipsImage **out,
int left, int top, int width, int height, ... )
__attribute__((sentinel));
int vips_smartcrop( VipsImage *in, VipsImage **out, int width, int height, ... )
__attribute__((sentinel));
int vips_extract_band( VipsImage *in, VipsImage **out, int band, ... )
__attribute__((sentinel));
int vips_replicate( VipsImage *in, VipsImage **out, int across, int down, ... )
__attribute__((sentinel));
int vips_grid( VipsImage *in, VipsImage **out,
int tile_height, int across, int down, ... )
__attribute__((sentinel));
int vips_transpose3d( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_wrap( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_rot( VipsImage *in, VipsImage **out, VipsAngle angle, ... )
__attribute__((sentinel));
int vips_rot90( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_rot180( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_rot270( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_rot45( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
VipsAngle vips_autorot_get_angle( VipsImage *image );
void vips_autorot_remove_angle( VipsImage *image );
int vips_autorot( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_zoom( VipsImage *in, VipsImage **out, int xfac, int yfac, ... )
__attribute__((sentinel));
int vips_subsample( VipsImage *in, VipsImage **out, int xfac, int yfac, ... )
__attribute__((sentinel));
int vips_cast( VipsImage *in, VipsImage **out, VipsBandFormat format, ... )
__attribute__((sentinel));
int vips_cast_uchar( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_cast_char( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_cast_ushort( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_cast_short( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_cast_uint( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_cast_int( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_cast_float( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_cast_double( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_cast_complex( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_cast_dpcomplex( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_scale( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_msb( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_byteswap( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_bandjoin( VipsImage **in, VipsImage **out, int n, ... )
__attribute__((sentinel));
int vips_bandjoin2( VipsImage *in1, VipsImage *in2, VipsImage **out, ... )
__attribute__((sentinel));
int vips_bandjoin_const( VipsImage *in, VipsImage **out, double *c, int n, ... )
__attribute__((sentinel));
int vips_bandjoin_const1( VipsImage *in, VipsImage **out, double c, ... )
__attribute__((sentinel));
int vips_bandrank( VipsImage **in, VipsImage **out, int n, ... )
__attribute__((sentinel));
int vips_bandfold( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_bandunfold( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_bandbool( VipsImage *in, VipsImage **out,
VipsOperationBoolean boolean, ... )
__attribute__((sentinel));
int vips_bandand( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_bandor( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_bandeor( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_bandmean( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_recomb( VipsImage *in, VipsImage **out, VipsImage *m, ... )
__attribute__((sentinel));
int vips_ifthenelse( VipsImage *cond, VipsImage *in1, VipsImage *in2,
VipsImage **out, ... )
__attribute__((sentinel));
int vips_flatten( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_addalpha( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_premultiply( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_unpremultiply( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_composite( VipsImage **in, VipsImage **out, int n, int *mode, ... )
__attribute__((sentinel));
int vips_composite2( VipsImage *base, VipsImage *overlay, VipsImage **out,
VipsBlendMode mode1, ... )
__attribute__((sentinel));
int vips_falsecolour( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_gamma( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_CONVERSION_H*/

82
node_modules/sharp/vendor/include/vips/convolution.h generated vendored Normal file
View File

@ -0,0 +1,82 @@
/* convolution.h
*
* 20/9/09
* - from proto.h
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_CONVOLUTION_H
#define VIPS_CONVOLUTION_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
typedef enum {
VIPS_COMBINE_MAX,
VIPS_COMBINE_SUM,
VIPS_COMBINE_MIN,
VIPS_COMBINE_LAST
} VipsCombine;
int vips_conv( VipsImage *in, VipsImage **out, VipsImage *mask, ... )
__attribute__((sentinel));
int vips_convf( VipsImage *in, VipsImage **out, VipsImage *mask, ... )
__attribute__((sentinel));
int vips_convi( VipsImage *in, VipsImage **out, VipsImage *mask, ... )
__attribute__((sentinel));
int vips_conva( VipsImage *in, VipsImage **out, VipsImage *mask, ... )
__attribute__((sentinel));
int vips_convsep( VipsImage *in, VipsImage **out, VipsImage *mask, ... )
__attribute__((sentinel));
int vips_convasep( VipsImage *in, VipsImage **out, VipsImage *mask, ... )
__attribute__((sentinel));
int vips_compass( VipsImage *in, VipsImage **out, VipsImage *mask, ... )
__attribute__((sentinel));
int vips_gaussblur( VipsImage *in, VipsImage **out, double sigma, ... )
__attribute__((sentinel));
int vips_sharpen( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_spcor( VipsImage *in, VipsImage *ref, VipsImage **out, ... )
__attribute__((sentinel));
int vips_fastcor( VipsImage *in, VipsImage *ref, VipsImage **out, ... )
__attribute__((sentinel));
int vips_sobel( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_canny( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_CONVOLUTION_H*/

126
node_modules/sharp/vendor/include/vips/create.h generated vendored Normal file
View File

@ -0,0 +1,126 @@
/* create.h
*
* 20/9/09
* - from proto.h
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_CREATE_H
#define VIPS_CREATE_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
int vips_black( VipsImage **out, int width, int height, ... )
__attribute__((sentinel));
int vips_xyz( VipsImage **out, int width, int height, ... )
__attribute__((sentinel));
int vips_grey( VipsImage **out, int width, int height, ... )
__attribute__((sentinel));
int vips_gaussmat( VipsImage **out, double sigma, double min_ampl, ... )
__attribute__((sentinel));
int vips_logmat( VipsImage **out, double sigma, double min_ampl, ... )
__attribute__((sentinel));
int vips_text( VipsImage **out, const char *text, ... )
__attribute__((sentinel));
int vips_gaussnoise( VipsImage **out, int width, int height, ... )
__attribute__((sentinel));
int vips_eye( VipsImage **out, int width, int height, ... )
__attribute__((sentinel));
int vips_sines( VipsImage **out, int width, int height, ... )
__attribute__((sentinel));
int vips_zone( VipsImage **out, int width, int height, ... )
__attribute__((sentinel));
int vips_identity( VipsImage **out, ... )
__attribute__((sentinel));
int vips_buildlut( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_invertlut( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_tonelut( VipsImage **out, ... )
__attribute__((sentinel));
int vips_mask_ideal( VipsImage **out, int width, int height,
double frequency_cutoff, ... )
__attribute__((sentinel));
int vips_mask_ideal_ring( VipsImage **out, int width, int height,
double frequency_cutoff, double ringwidth, ... )
__attribute__((sentinel));
int vips_mask_ideal_band( VipsImage **out, int width, int height,
double frequency_cutoff_x, double frequency_cutoff_y,
double radius, ... )
__attribute__((sentinel));
int vips_mask_butterworth( VipsImage **out, int width, int height,
double order,
double frequency_cutoff, double amplitude_cutoff, ... )
__attribute__((sentinel));
int vips_mask_butterworth_ring( VipsImage **out, int width, int height,
double order,
double frequency_cutoff, double amplitude_cutoff,
double ringwidth, ... )
__attribute__((sentinel));
int vips_mask_butterworth_band( VipsImage **out, int width, int height,
double order,
double frequency_cutoff_x, double frequency_cutoff_y, double radius,
double amplitude_cutoff, ... )
__attribute__((sentinel));
int vips_mask_gaussian( VipsImage **out, int width, int height,
double frequency_cutoff, double amplitude_cutoff, ... )
__attribute__((sentinel));
int vips_mask_gaussian_ring( VipsImage **out, int width, int height,
double frequency_cutoff, double amplitude_cutoff,
double ringwidth, ... )
__attribute__((sentinel));
int vips_mask_gaussian_band( VipsImage **out, int width, int height,
double frequency_cutoff_x, double frequency_cutoff_y, double radius,
double amplitude_cutoff, ... )
__attribute__((sentinel));
int vips_mask_fractal( VipsImage **out, int width, int height,
double fractal_dimension, ... )
__attribute__((sentinel));
int vips_fractsurf( VipsImage **out,
int width, int height, double fractal_dimension, ... )
__attribute__((sentinel));
int vips_worley( VipsImage **out, int width, int height, ... )
__attribute__((sentinel));
int vips_perlin( VipsImage **out, int width, int height, ... )
__attribute__((sentinel));
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_CREATE_H*/

84
node_modules/sharp/vendor/include/vips/dbuf.h generated vendored Normal file
View File

@ -0,0 +1,84 @@
/* A dynamic memory buffer that expands as you write.
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_DBUF_H
#define VIPS_DBUF_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#include <vips/vips.h>
/* A buffer in the process of being written to.
*/
typedef struct _VipsDbuf {
/* All fields are private.
*/
/*< private >*/
/* The current base, and the size of the allocated memory area.
*/
unsigned char *data;
size_t allocated_size;
/* The size of the actual data that's been written. This will usually
* be <= allocated_size, but always >= write_point.
*/
size_t data_size;
/* The write point.
*/
size_t write_point;
} VipsDbuf;
void vips_dbuf_destroy( VipsDbuf *dbuf );
void vips_dbuf_init( VipsDbuf *dbuf );
gboolean vips_dbuf_allocate( VipsDbuf *dbuf, size_t size );
size_t vips_dbuf_read( VipsDbuf *dbuf, unsigned char *data, size_t size );
unsigned char *vips_dbuf_get_write( VipsDbuf *dbuf, size_t *size );
gboolean vips_dbuf_write( VipsDbuf *dbuf,
const unsigned char *data, size_t size );
gboolean vips_dbuf_writef( VipsDbuf *dbuf, const char *fmt, ... );
void vips_dbuf_reset( VipsDbuf *dbuf );
void vips_dbuf_destroy( VipsDbuf *dbuf );
gboolean vips_dbuf_seek( VipsDbuf *dbuf, off_t offset, int whence );
void vips_dbuf_truncate( VipsDbuf *dbuf );
off_t vips_dbuf_tell( VipsDbuf *dbuf );
unsigned char *vips_dbuf_string( VipsDbuf *dbuf, size_t *size );
unsigned char *vips_dbuf_steal( VipsDbuf *dbuf, size_t *size );
#endif /*VIPS_DBUF_H*/
#ifdef __cplusplus
}
#endif /*__cplusplus*/

74
node_modules/sharp/vendor/include/vips/debug.h generated vendored Normal file
View File

@ -0,0 +1,74 @@
/* Support for debug.c in iofuncs.
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_DEBUG_H
#define VIPS_DEBUG_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#ifdef VIPS_DEBUG
#define VIPS_DEBUG_MSG( ... ) \
G_STMT_START { printf( __VA_ARGS__ ); } G_STMT_END
#else
#define VIPS_DEBUG_MSG( ... ) \
G_STMT_START { ; } G_STMT_END
#endif /*VIPS_DEBUG*/
#ifdef VIPS_DEBUG_RED
#define VIPS_DEBUG_MSG_RED( ... ) \
G_STMT_START { printf( "red: " __VA_ARGS__ ); } G_STMT_END
#else
#define VIPS_DEBUG_MSG_RED( ... ) \
G_STMT_START { ; } G_STMT_END
#endif /*VIPS_DEBUG_RED*/
#ifdef VIPS_DEBUG_AMBER
#define VIPS_DEBUG_MSG_AMBER( ... ) \
G_STMT_START { printf( "amber: " __VA_ARGS__ ); } G_STMT_END
#else
#define VIPS_DEBUG_MSG_AMBER( ... ) \
G_STMT_START { ; } G_STMT_END
#endif /*VIPS_DEBUG_AMBER*/
#ifdef VIPS_DEBUG_GREEN
#define VIPS_DEBUG_MSG_GREEN( ... ) \
G_STMT_START { printf( "green: " __VA_ARGS__ ); } G_STMT_END
#else
#define VIPS_DEBUG_MSG_GREEN( ... ) \
G_STMT_START { ; } G_STMT_END
#endif /*VIPS_DEBUG_GREEN*/
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /* VIPS_DEBUG_H */

155
node_modules/sharp/vendor/include/vips/deprecated.h generated vendored Normal file
View File

@ -0,0 +1,155 @@
/* Old and broken stuff we do not enable by default
*
* 30/6/09
* - from vips.h
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef IM_DEPRECATED_H
#define IM_DEPRECATED_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
/* On win32, need to override the wingdi defs for these. Yuk!
*/
#ifdef HAVE_WINDOWS_H
#ifdef RGB
#undef RGB
#endif
#ifdef CMYK
#undef CMYK
#endif
#endif /*HAVE_WINDOWS_H*/
/* Bits per Band */
#define BBBYTE 8
#define BBSHORT 16
#define BBINT 32
#define BBFLOAT 32
#define BBCOMPLEX 64 /* complex consisting of two floats */
#define BBDOUBLE 64
#define BBDPCOMPLEX 128 /* complex consisting of two doubles */
/* picture Type */
#define MULTIBAND 0
#define B_W 1
#define LUMINACE 2
#define XRAY 3
#define IR 4
#define YUV 5
#define RED_ONLY 6 /* red channel only */
#define GREEN_ONLY 7 /* green channel only */
#define BLUE_ONLY 8 /* blue channel only */
#define POWER_SPECTRUM 9
#define HISTOGRAM 10
#define FOURIER 24
/* Colour spaces.
*/
#define LUT 11
#define XYZ 12
#define LAB 13
#define CMC 14
#define CMYK 15
#define LABQ 16
#define RGB 17
#define UCS 18
#define LCH 19
#define LABS 21
#define sRGB 22
#define YXY 23
/* BandFmt
*/
#define FMTNOTSET -1
#define FMTUCHAR 0 /* pels interpreted as unsigned chars */
#define FMTCHAR 1 /* pels interpreted as signed chars */
#define FMTUSHORT 2 /* pels interpreted as unsigned shorts */
#define FMTSHORT 3 /* pels interpreted as signed shorts */
#define FMTUINT 4 /* pels interpreted as unsigned ints */
#define FMTINT 5 /* pels interpreted as signed ints */
#define FMTFLOAT 6 /* pels interpreted as floats */
#define FMTCOMPLEX 7 /* pels interpreted as complex (2 float each) */
#define FMTDOUBLE 8 /* pels interpreted as unsigned double */
#define FMTDPCOMPLEX 9 /* pels interpreted as complex (2 double each)*/
/* Coding type
*/
#define NOCODING 0
#define COLQUANT 1
#define LABPACK 2
#define LABPACK_COMPRESSED 3
#define RGB_COMPRESSED 4
#define LUM_COMPRESSED 5
/* Compression type
*/
#define NO_COMPRESSION 0
#define TCSF_COMPRESSION 1
#define JPEG_COMPRESSION 2
#define esize(I) IM_IMAGE_SIZEOF_ELEMENT(I)
#define psize(I) IM_IMAGE_SIZEOF_PEL(I)
#define lsize(I) IM_IMAGE_SIZEOF_LINE(I)
#define niele(I) IM_IMAGE_N_ELEMENTS(I)
#define lskip(B) IM_REGION_LSKIP(B)
#define nele(B) IM_REGION_N_ELEMENTS(B)
#define rsize(B) IM_REGION_SIZEOF_LINE(B)
#define addr(B,X,Y) IM_REGION_ADDR(B,X,Y)
#ifndef MAX
#define MAX(A,B) IM_MAX(A, B)
#define MIN(A,B) IM_MIN(A, B)
#endif /*MAX*/
#define CLIP(A,V,B) IM_CLIP(A, V, B)
#define NEW(IM,A) IM_NEW(IM,A)
#define NUMBER(R) IM_NUMBER(R)
#define ARRAY(IM,N,T) IM_ARRAY(IM,N,T)
#define RINT( R ) IM_RINT( R )
#define CLIP_UCHAR( V, SEQ ) IM_CLIP_UCHAR( V, SEQ )
#define CLIP_USHORT( V, SEQ ) IM_CLIP_USHORT( V, SEQ )
#define CLIP_CHAR( V, SEQ ) IM_CLIP_CHAR( V, SEQ )
#define CLIP_SHORT( V, SEQ ) IM_CLIP_SHORT( V, SEQ )
#define CLIP_NONE( V, SEQ ) IM_CLIP_NONE( V, SEQ )
#define right(R) IM_RECT_RIGHT(R)
#define bottom(R) IM_RECT_BOTTOM(R)
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*IM_DEPRECATED_H*/

301
node_modules/sharp/vendor/include/vips/dispatch.h generated vendored Normal file
View File

@ -0,0 +1,301 @@
/* VIPS function dispatch.
*
* J. Cupitt, 8/4/93.
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef IM_DISPATCH_H
#define IM_DISPATCH_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#include <glib-object.h>
#include <vips/vips.h>
#include <vips/util.h>
/* Type names. You may define your own, but if you use one of these, then
* you should use the built-in VIPS type converters.
*/
#define IM_TYPE_IMAGEVEC "imagevec" /* im_object is ptr to IMAGE[] */
#define IM_TYPE_DOUBLEVEC "doublevec" /* im_object is ptr to double[] */
#define IM_TYPE_INTVEC "intvec" /* im_object is ptr to int[] */
#define IM_TYPE_DOUBLE "double" /* im_object is ptr to double */
#define IM_TYPE_INT "integer" /* 32-bit integer */
#define IM_TYPE_COMPLEX "complex" /* Pair of doubles */
#define IM_TYPE_STRING "string" /* Zero-terminated char array */
#define IM_TYPE_IMASK "intmask" /* Integer mask type */
#define IM_TYPE_DMASK "doublemask" /* Double mask type */
#define IM_TYPE_IMAGE "image" /* IMAGE descriptor */
#define IM_TYPE_DISPLAY "display" /* Display descriptor */
#define IM_TYPE_GVALUE "gvalue" /* GValue wrapper */
#define IM_TYPE_INTERPOLATE "interpolate"/* A subclass of VipsInterpolate */
typedef char *im_arg_type; /* Type of argument id */
/* Internal representation of an argument to an image processing function.
*/
typedef void *im_object;
/* These bits are ored together to make the flags in a type descriptor.
*
* IM_TYPE_OUTPUT: set to indicate output, otherwise input. If the IM_TYPE_RW
* bit is set and IM_TYPE_OUTPUT is not set, both input and output (ie. the
* operation side-effects this argument).
*
* IM_TYPE_ARG: Two ways of making an im_object --- with and without a
* command-line string to help you along. Arguments with a string are thing
* like IMAGE descriptors, which require a filename to initialise.
* Arguments without are things like output numbers, where making the object
* simply involves allocating storage.
*/
typedef enum {
IM_TYPE_NONE = 0, /* No flags */
IM_TYPE_OUTPUT = 0x1, /* Output/input object */
IM_TYPE_ARG = 0x2, /* Uses a str arg in construction */
IM_TYPE_RW = 0x4 /* Read-write */
} im_type_flags;
/* Initialise, destroy and write objects. The "str" argument to the
* init function will not be supplied if this is not an ARG type. The
* write function writes to the GString.
*/
typedef int (*im_init_obj_fn)( im_object *obj, char *str );
typedef int (*im_dest_obj_fn)( im_object obj );
/* Describe a VIPS type.
*/
typedef struct {
im_arg_type type; /* Type of argument */
int size; /* sizeof( im_object repres. ) */
im_type_flags flags; /* Flags */
im_init_obj_fn init; /* Operation functions */
im_dest_obj_fn dest; /* Destroy object */
} im_type_desc;
/* Success on an argument. This is called if the image processing function
* succeeds and should be used to (for example) print output.
*/
typedef int (*im_print_obj_fn)( im_object obj );
/* Describe a VIPS command argument.
*/
typedef struct {
char *name; /* eg. "width" */
im_type_desc *desc; /* Type description */
im_print_obj_fn print; /* Print some output objects */
} im_arg_desc;
/* Type of VIPS dispatch funtion.
*/
typedef int (*im_dispatch_fn)( im_object *argv );
/* Maximum size of arg table.
*/
#define IM_MAX_ARGS (1000)
/* Flags for functions. These are for information only, and more may be
* added.
*/
typedef enum {
IM_FN_NONE = 0, /* No flags set */
IM_FN_PIO = 0x1, /* Is a partial function */
IM_FN_TRANSFORM = 0x2, /* Performs coordinate transformations */
IM_FN_PTOP = 0x4, /* Point-to-point ... can be done with a LUT */
IM_FN_NOCACHE = 0x8 /* Result should not be cached */
} im_fn_flags;
/* Describe a VIPS function.
*/
typedef struct {
char *name; /* eg "im_invert" */
char *desc; /* Description - eg "photographic negative" */
im_fn_flags flags; /* Flags for this function */
im_dispatch_fn disp; /* Dispatch */
int argc; /* Number of args */
im_arg_desc *argv; /* Arg table */
} im_function;
/* A set of VIPS functions forming a package.
*/
typedef struct {
char *name; /* Package name (eg "arithmetic") */
int nfuncs; /* Number of functions in package */
im_function **table; /* Array of function descriptors */
} im_package;
/* Externs for dispatch.
*/
/* Struct for mask IO to a file.
*/
typedef struct {
char *name; /* Command-line name in */
void *mask; /* Mask --- DOUBLE or INT */
} im_mask_object;
/* Struct for doublevec IO
*/
typedef struct {
int n; /* Vector length */
double *vec; /* Vector */
} im_doublevec_object;
/* Struct for intvec IO
*/
typedef struct {
int n; /* Vector length */
int *vec; /* Vector */
} im_intvec_object;
/* Struct for imagevec IO
*/
typedef struct {
int n; /* Vector length */
IMAGE **vec; /* Vector */
} im_imagevec_object;
/* Built-in VIPS types.
*/
extern im_type_desc im__input_int;
extern im_type_desc im__input_intvec;
extern im_type_desc im__input_imask;
extern im_type_desc im__output_int;
extern im_type_desc im__output_intvec;
extern im_type_desc im__output_imask;
extern im_type_desc im__input_double;
extern im_type_desc im__input_doublevec;
extern im_type_desc im__input_dmask;
extern im_type_desc im__output_double;
extern im_type_desc im__output_doublevec;
extern im_type_desc im__output_dmask;
extern im_type_desc im__output_dmask_screen;
extern im_type_desc im__output_complex;
extern im_type_desc im__input_string;
extern im_type_desc im__output_string;
extern im_type_desc im__input_imagevec;
extern im_type_desc im__input_image;
extern im_type_desc im__output_image;
extern im_type_desc im__rw_image;
extern im_type_desc im__input_display;
extern im_type_desc im__output_display;
extern im_type_desc im__input_gvalue;
extern im_type_desc im__output_gvalue;
extern im_type_desc im__input_interpolate;
/* VIPS print functions.
*/
int im__iprint( im_object obj ); /* int */
int im__ivprint( im_object obj ); /* intvec */
int im__dprint( im_object obj ); /* double */
int im__dvprint( im_object obj ); /* doublevec */
int im__dmsprint( im_object obj ); /* DOUBLEMASK as stats */
int im__cprint( im_object obj ); /* complex */
int im__sprint( im_object obj ); /* string */
int im__displayprint( im_object obj ); /* im_col_display */
int im__gprint( im_object obj ); /* GValue */
/* Macros for convenient creation.
*/
#define IM_INPUT_INT( S ) { S, &im__input_int, NULL }
#define IM_INPUT_INTVEC( S ) { S, &im__input_intvec, NULL }
#define IM_INPUT_IMASK( S ) { S, &im__input_imask, NULL }
#define IM_OUTPUT_INT( S ) { S, &im__output_int, im__iprint }
#define IM_OUTPUT_INTVEC( S ) { S, &im__output_intvec, im__ivprint }
#define IM_OUTPUT_IMASK( S ) { S, &im__output_imask, NULL }
#define IM_INPUT_DOUBLE( S ) { S, &im__input_double, NULL }
#define IM_INPUT_DOUBLEVEC( S ) { S, &im__input_doublevec, NULL }
#define IM_INPUT_DMASK( S ) { S, &im__input_dmask, NULL }
#define IM_OUTPUT_DOUBLE( S ) { S, &im__output_double, im__dprint }
#define IM_OUTPUT_DOUBLEVEC( S ) { S, &im__output_doublevec, im__dvprint }
#define IM_OUTPUT_DMASK( S ) { S, &im__output_dmask, NULL }
#define IM_OUTPUT_DMASK_STATS( S ) { S, &im__output_dmask_screen, im__dmsprint }
#define IM_OUTPUT_COMPLEX( S ) { S, &im__output_complex, im__cprint }
#define IM_INPUT_STRING( S ) { S, &im__input_string, NULL }
#define IM_OUTPUT_STRING( S ) { S, &im__output_string, im__sprint }
#define IM_INPUT_IMAGE( S ) { S, &im__input_image, NULL }
#define IM_INPUT_IMAGEVEC( S ) { S, &im__input_imagevec, NULL }
#define IM_OUTPUT_IMAGE( S ) { S, &im__output_image, NULL }
#define IM_RW_IMAGE( S ) { S, &im__rw_image, NULL }
#define IM_INPUT_DISPLAY( S ) { S, &im__input_display, NULL }
#define IM_OUTPUT_DISPLAY( S ) { S, &im__output_display, im__displayprint }
#define IM_INPUT_GVALUE( S ) { S, &im__input_gvalue, NULL }
#define IM_OUTPUT_GVALUE( S ) { S, &im__output_gvalue, im__gprint }
#define IM_INPUT_INTERPOLATE( S ) { S, &im__input_interpolate, NULL }
/* Add a plug-in package.
*/
im_package *im_load_plugin( const char *name );
int im_load_plugins( const char *fmt, ... )
__attribute__((format(printf, 1, 2)));
/* Close all plug-ins.
*/
int im_close_plugins( void );
/* Loop over all loaded packages.
*/
void *im_map_packages( VipsSListMap2Fn fn, void *a );
/* Convenience functions for finding packages, functions, etc.
*/
im_function *im_find_function( const char *name );
im_package *im_find_package( const char *name );
im_package *im_package_of_function( const char *name );
/* Allocate space for, and free im_object argument lists.
*/
int im_free_vargv( im_function *fn, im_object *vargv );
int im_allocate_vargv( im_function *fn, im_object *vargv );
/* Run a VIPS command by name.
*/
int im_run_command( char *name, int argc, char **argv );
int vips__input_interpolate_init( im_object *obj, char *str );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*IM_DISPATCH_H*/

95
node_modules/sharp/vendor/include/vips/draw.h generated vendored Normal file
View File

@ -0,0 +1,95 @@
/* draw.h
*
* 3/11/09
* - from proto.h
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_DRAW_H
#define VIPS_DRAW_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
typedef enum {
VIPS_COMBINE_MODE_SET,
VIPS_COMBINE_MODE_ADD,
VIPS_COMBINE_MODE_LAST
} VipsCombineMode;
int vips_draw_rect( VipsImage *image,
double *ink, int n, int left, int top, int width, int height, ... )
__attribute__((sentinel));
int vips_draw_rect1( VipsImage *image,
double ink, int left, int top, int width, int height, ... )
__attribute__((sentinel));
int vips_draw_point( VipsImage *image, double *ink, int n, int x, int y, ... )
__attribute__((sentinel));
int vips_draw_point1( VipsImage *image, double ink, int x, int y, ... )
__attribute__((sentinel));
int vips_draw_image( VipsImage *image, VipsImage *sub, int x, int y, ... )
__attribute__((sentinel));
int vips_draw_mask( VipsImage *image,
double *ink, int n, VipsImage *mask, int x, int y, ... )
__attribute__((sentinel));
int vips_draw_mask1( VipsImage *image,
double ink, VipsImage *mask, int x, int y, ... )
__attribute__((sentinel));
int vips_draw_line( VipsImage *image,
double *ink, int n, int x1, int y1, int x2, int y2, ... )
__attribute__((sentinel));
int vips_draw_line1( VipsImage *image,
double ink, int x1, int y1, int x2, int y2, ... )
__attribute__((sentinel));
int vips_draw_circle( VipsImage *image,
double *ink, int n, int cx, int cy, int radius, ... )
__attribute__((sentinel));
int vips_draw_circle1( VipsImage *image,
double ink, int cx, int cy, int radius, ... )
__attribute__((sentinel));
int vips_draw_flood( VipsImage *image, double *ink, int n, int x, int y, ... )
__attribute__((sentinel));
int vips_draw_flood1( VipsImage *image, double ink, int x, int y, ... )
__attribute__((sentinel));
int vips_draw_smudge( VipsImage *image,
int left, int top, int width, int height, ... )
__attribute__((sentinel));
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_DRAW_H*/

115
node_modules/sharp/vendor/include/vips/enumtypes.h generated vendored Normal file
View File

@ -0,0 +1,115 @@
/* This file is generated by glib-mkenums, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */
#ifndef VIPS_ENUM_TYPES_H
#define VIPS_ENUM_TYPES_H
G_BEGIN_DECLS
/* enumerations from "../../../libvips/include/vips/arithmetic.h" */
GType vips_operation_math_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_OPERATION_MATH (vips_operation_math_get_type())
GType vips_operation_math2_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_OPERATION_MATH2 (vips_operation_math2_get_type())
GType vips_operation_round_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_OPERATION_ROUND (vips_operation_round_get_type())
GType vips_operation_relational_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_OPERATION_RELATIONAL (vips_operation_relational_get_type())
GType vips_operation_boolean_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_OPERATION_BOOLEAN (vips_operation_boolean_get_type())
GType vips_operation_complex_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_OPERATION_COMPLEX (vips_operation_complex_get_type())
GType vips_operation_complex2_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_OPERATION_COMPLEX2 (vips_operation_complex2_get_type())
GType vips_operation_complexget_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_OPERATION_COMPLEXGET (vips_operation_complexget_get_type())
/* enumerations from "../../../libvips/include/vips/basic.h" */
GType vips_precision_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_PRECISION (vips_precision_get_type())
/* enumerations from "../../../libvips/include/vips/colour.h" */
GType vips_intent_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_INTENT (vips_intent_get_type())
GType vips_pcs_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_PCS (vips_pcs_get_type())
/* enumerations from "../../../libvips/include/vips/conversion.h" */
GType vips_extend_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_EXTEND (vips_extend_get_type())
GType vips_compass_direction_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_COMPASS_DIRECTION (vips_compass_direction_get_type())
GType vips_direction_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_DIRECTION (vips_direction_get_type())
GType vips_align_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_ALIGN (vips_align_get_type())
GType vips_angle_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_ANGLE (vips_angle_get_type())
GType vips_angle45_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_ANGLE45 (vips_angle45_get_type())
GType vips_interesting_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_INTERESTING (vips_interesting_get_type())
GType vips_blend_mode_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_BLEND_MODE (vips_blend_mode_get_type())
/* enumerations from "../../../libvips/include/vips/convolution.h" */
GType vips_combine_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_COMBINE (vips_combine_get_type())
/* enumerations from "../../../libvips/include/vips/draw.h" */
GType vips_combine_mode_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_COMBINE_MODE (vips_combine_mode_get_type())
/* enumerations from "../../../libvips/include/vips/foreign.h" */
GType vips_foreign_flags_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_FOREIGN_FLAGS (vips_foreign_flags_get_type())
GType vips_saveable_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_SAVEABLE (vips_saveable_get_type())
GType vips_foreign_webp_preset_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_FOREIGN_WEBP_PRESET (vips_foreign_webp_preset_get_type())
GType vips_foreign_tiff_compression_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_FOREIGN_TIFF_COMPRESSION (vips_foreign_tiff_compression_get_type())
GType vips_foreign_tiff_predictor_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_FOREIGN_TIFF_PREDICTOR (vips_foreign_tiff_predictor_get_type())
GType vips_foreign_tiff_resunit_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_FOREIGN_TIFF_RESUNIT (vips_foreign_tiff_resunit_get_type())
GType vips_foreign_png_filter_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_FOREIGN_PNG_FILTER (vips_foreign_png_filter_get_type())
GType vips_foreign_dz_layout_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_FOREIGN_DZ_LAYOUT (vips_foreign_dz_layout_get_type())
GType vips_foreign_dz_depth_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_FOREIGN_DZ_DEPTH (vips_foreign_dz_depth_get_type())
GType vips_foreign_dz_container_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_FOREIGN_DZ_CONTAINER (vips_foreign_dz_container_get_type())
/* enumerations from "../../../libvips/include/vips/image.h" */
GType vips_demand_style_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_DEMAND_STYLE (vips_demand_style_get_type())
GType vips_image_type_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_IMAGE_TYPE (vips_image_type_get_type())
GType vips_interpretation_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_INTERPRETATION (vips_interpretation_get_type())
GType vips_band_format_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_BAND_FORMAT (vips_band_format_get_type())
GType vips_coding_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_CODING (vips_coding_get_type())
GType vips_access_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_ACCESS (vips_access_get_type())
/* enumerations from "../../../libvips/include/vips/morphology.h" */
GType vips_operation_morphology_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_OPERATION_MORPHOLOGY (vips_operation_morphology_get_type())
/* enumerations from "../../../libvips/include/vips/object.h" */
GType vips_argument_flags_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_ARGUMENT_FLAGS (vips_argument_flags_get_type())
/* enumerations from "../../../libvips/include/vips/operation.h" */
GType vips_operation_flags_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_OPERATION_FLAGS (vips_operation_flags_get_type())
/* enumerations from "../../../libvips/include/vips/region.h" */
GType vips_region_shrink_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_REGION_SHRINK (vips_region_shrink_get_type())
/* enumerations from "../../../libvips/include/vips/resample.h" */
GType vips_kernel_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_KERNEL (vips_kernel_get_type())
GType vips_size_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_SIZE (vips_size_get_type())
/* enumerations from "../../../libvips/include/vips/util.h" */
GType vips_token_get_type (void) G_GNUC_CONST;
#define VIPS_TYPE_TOKEN (vips_token_get_type())
G_END_DECLS
#endif /*VIPS_ENUM_TYPES_H*/
/* Generated data ends here */

97
node_modules/sharp/vendor/include/vips/error.h generated vendored Normal file
View File

@ -0,0 +1,97 @@
/* Error handling.
*/
/*
Copyright (C) 1991-2005 The National Gallery
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_ERROR_H
#define VIPS_ERROR_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
const char *vips_error_buffer( void );
void vips_error_clear( void );
void vips_error_freeze( void );
void vips_error_thaw( void );
void vips_error( const char *domain, const char *fmt, ... )
__attribute__((format(printf, 2, 3)));
void vips_verror( const char *domain, const char *fmt, va_list ap );
void vips_error_system( int err, const char *domain, const char *fmt, ... )
__attribute__((format(printf, 3, 4)));
void vips_verror_system( int err, const char *domain,
const char *fmt, va_list ap );
void vips_error_g( GError **error );
void vips_g_error( GError **error );
void vips_error_exit( const char *fmt, ... )
__attribute__((noreturn, format(printf, 1, 2)));
int vips_check_uncoded( const char *domain, VipsImage *im );
int vips_check_coding( const char *domain, VipsImage *im, VipsCoding coding );
int vips_check_coding_known( const char *domain, VipsImage *im );
int vips_check_coding_noneorlabq( const char *domain, VipsImage *im );
int vips_check_coding_same( const char *domain, VipsImage *im1, VipsImage *im2 );
int vips_check_mono( const char *domain, VipsImage *im );
int vips_check_bands( const char *domain, VipsImage *im, int bands );
int vips_check_bands_1or3( const char *domain, VipsImage *im );
int vips_check_bands_atleast( const char *domain, VipsImage *im, int bands );
int vips_check_bands_1orn( const char *domain, VipsImage *im1, VipsImage *im2 );
int vips_check_bands_1orn_unary( const char *domain, VipsImage *im, int n );
int vips_check_bands_same( const char *domain, VipsImage *im1, VipsImage *im2 );
int vips_check_bandno( const char *domain, VipsImage *im, int bandno );
int vips_check_int( const char *domain, VipsImage *im );
int vips_check_uint( const char *domain, VipsImage *im );
int vips_check_uintorf( const char *domain, VipsImage *im );
int vips_check_noncomplex( const char *domain, VipsImage *im );
int vips_check_complex( const char *domain, VipsImage *im );
int vips_check_twocomponents( const char *domain, VipsImage *im );
int vips_check_format( const char *domain, VipsImage *im, VipsBandFormat fmt );
int vips_check_u8or16( const char *domain, VipsImage *im );
int vips_check_8or16( const char *domain, VipsImage *im );
int vips_check_u8or16orf( const char *domain, VipsImage *im );
int vips_check_format_same( const char *domain, VipsImage *im1, VipsImage *im2 );
int vips_check_size_same( const char *domain, VipsImage *im1, VipsImage *im2 );
int vips_check_oddsquare( const char *domain, VipsImage *im );
int vips_check_vector_length( const char *domain, int n, int len );
int vips_check_vector( const char *domain, int n, VipsImage *im );
int vips_check_hist( const char *domain, VipsImage *im );
int vips_check_matrix( const char *domain, VipsImage *im, VipsImage **out );
int vips_check_separable( const char *domain, VipsImage *im );
int vips_check_precision_intfloat( const char *domain,
VipsPrecision precision );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_ERROR_H*/

618
node_modules/sharp/vendor/include/vips/foreign.h generated vendored Normal file
View File

@ -0,0 +1,618 @@
/* Base type for supported image formats. Subclass this to add a new
* format.
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_FOREIGN_H
#define VIPS_FOREIGN_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#define VIPS_TYPE_FOREIGN (vips_foreign_get_type())
#define VIPS_FOREIGN( obj ) \
(G_TYPE_CHECK_INSTANCE_CAST( (obj), \
VIPS_TYPE_FOREIGN, VipsForeign ))
#define VIPS_FOREIGN_CLASS( klass ) \
(G_TYPE_CHECK_CLASS_CAST( (klass), \
VIPS_TYPE_FOREIGN, VipsForeignClass))
#define VIPS_IS_FOREIGN( obj ) \
(G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_FOREIGN ))
#define VIPS_IS_FOREIGN_CLASS( klass ) \
(G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_FOREIGN ))
#define VIPS_FOREIGN_GET_CLASS( obj ) \
(G_TYPE_INSTANCE_GET_CLASS( (obj), \
VIPS_TYPE_FOREIGN, VipsForeignClass ))
typedef struct _VipsForeign {
VipsOperation parent_object;
/*< public >*/
} VipsForeign;
typedef struct _VipsForeignClass {
VipsOperationClass parent_class;
/*< public >*/
/* Loop over formats in this order, default 0. We need this because
* some formats can be read by several loaders (eg. tiff can be read
* by the libMagick loader as well as by the tiff loader), and we want
* to make sure the better loader comes first.
*/
int priority;
/* Null-terminated list of recommended suffixes, eg. ".tif", ".tiff".
* This can be used by both load and save, so it's in the base class.
*/
const char **suffs;
} VipsForeignClass;
/* Don't put spaces around void here, it breaks gtk-doc.
*/
GType vips_foreign_get_type(void);
/* Map over and find formats. This uses type introspection to loop over
* subclasses of VipsForeign.
*/
void *vips_foreign_map( const char *base,
VipsSListMap2Fn fn, void *a, void *b );
/* Image file load properties.
*
* Keep in sync with the deprecated VipsFormatFlags, we need to be able to
* cast between them.
*/
typedef enum /*< flags >*/ {
VIPS_FOREIGN_NONE = 0, /* No flags set */
VIPS_FOREIGN_PARTIAL = 1, /* Lazy read OK (eg. tiled tiff) */
VIPS_FOREIGN_BIGENDIAN = 2, /* Most-significant byte first */
VIPS_FOREIGN_SEQUENTIAL = 4, /* Top-to-bottom lazy read OK */
VIPS_FOREIGN_ALL = 7 /* All flags set */
} VipsForeignFlags;
#define VIPS_TYPE_FOREIGN_LOAD (vips_foreign_load_get_type())
#define VIPS_FOREIGN_LOAD( obj ) \
(G_TYPE_CHECK_INSTANCE_CAST( (obj), \
VIPS_TYPE_FOREIGN_LOAD, VipsForeignLoad ))
#define VIPS_FOREIGN_LOAD_CLASS( klass ) \
(G_TYPE_CHECK_CLASS_CAST( (klass), \
VIPS_TYPE_FOREIGN_LOAD, VipsForeignLoadClass))
#define VIPS_IS_FOREIGN_LOAD( obj ) \
(G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_FOREIGN_LOAD ))
#define VIPS_IS_FOREIGN_LOAD_CLASS( klass ) \
(G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_FOREIGN_LOAD ))
#define VIPS_FOREIGN_LOAD_GET_CLASS( obj ) \
(G_TYPE_INSTANCE_GET_CLASS( (obj), \
VIPS_TYPE_FOREIGN_LOAD, VipsForeignLoadClass ))
typedef struct _VipsForeignLoad {
VipsForeign parent_object;
/*< private >*/
/* Set TRUE to force open via memory.
*/
gboolean memory;
/* Type of access upstream wants and the loader must supply.
*/
VipsAccess access;
/* Flags for this load operation.
*/
VipsForeignFlags flags;
/* Stop load on first warning.
*/
gboolean fail;
/* Deprecated and unused, just here for compat.
*/
gboolean sequential;
/*< public >*/
/* The image we generate. This must be set by ->header().
*/
VipsImage *out;
/* The behind-the-scenes real image we decompress to. This can be a
* disc file or a memory buffer. This must be set by ->load().
*/
VipsImage *real;
/* Set this to tag the operation as nocache.
*/
gboolean nocache;
/* Deprecated: the memory option used to be called disc and default
* TRUE.
*/
gboolean disc;
/* Set if a start function fails. We want to prevent the other starts
* from also triggering the load.
*/
gboolean error;
} VipsForeignLoad;
typedef struct _VipsForeignLoadClass {
VipsForeignClass parent_class;
/*< public >*/
/* Is a file in this format.
*
* This function should return %TRUE if the file contains an image of
* this type. If you don't define this function, #VipsForeignLoad
* will use @suffs instead.
*/
gboolean (*is_a)( const char *filename );
/* Is a buffer in this format.
*
* This function should return %TRUE if the buffer contains an image of
* this type.
*/
gboolean (*is_a_buffer)( const void *data, size_t size );
/* Get the flags from a filename.
*
* This function should examine the file and return a set
* of flags. If you don't define it, vips will default to 0 (no flags
* set).
*
* This operation is necessary for vips7 compatibility.
*/
VipsForeignFlags (*get_flags_filename)( const char *filename );
/* Get the flags for this load operation. Images can be loaded from
* (for example) memory areas rather than files, so you can't just use
* @get_flags_filename().
*/
VipsForeignFlags (*get_flags)( VipsForeignLoad *load );
/* Do the minimum read we can.
*
* Set the header fields in @out from @filename. If you can read the
* whole image as well with no performance cost (as with vipsload),
* or if your loader does not support reading only the header, read
* the entire image in this method and leave @load() NULL.
*
* @header() needs to set the dhint on the image .. otherwise you get
* the default SMALLTILE.
*
* Return 0 for success, -1 for error, setting
* vips_error().
*/
int (*header)( VipsForeignLoad *load );
/* Read the whole image into @real. The pixels will get copied to @out
* later.
*
* You can omit this method if you define a @header() method which
* loads the whole file.
*
* Return 0 for success, -1 for error, setting
* vips_error().
*/
int (*load)( VipsForeignLoad *load );
} VipsForeignLoadClass;
/* Don't put spaces around void here, it breaks gtk-doc.
*/
GType vips_foreign_load_get_type(void);
const char *vips_foreign_find_load( const char *filename );
const char *vips_foreign_find_load_buffer( const void *data, size_t size );
VipsForeignFlags vips_foreign_flags( const char *loader, const char *filename );
gboolean vips_foreign_is_a( const char *loader, const char *filename );
gboolean vips_foreign_is_a_buffer( const char *loader,
const void *data, size_t size );
void vips_foreign_load_invalidate( VipsImage *image );
#define VIPS_TYPE_FOREIGN_SAVE (vips_foreign_save_get_type())
#define VIPS_FOREIGN_SAVE( obj ) \
(G_TYPE_CHECK_INSTANCE_CAST( (obj), \
VIPS_TYPE_FOREIGN_SAVE, VipsForeignSave ))
#define VIPS_FOREIGN_SAVE_CLASS( klass ) \
(G_TYPE_CHECK_CLASS_CAST( (klass), \
VIPS_TYPE_FOREIGN_SAVE, VipsForeignSaveClass))
#define VIPS_IS_FOREIGN_SAVE( obj ) \
(G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_FOREIGN_SAVE ))
#define VIPS_IS_FOREIGN_SAVE_CLASS( klass ) \
(G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_FOREIGN_SAVE ))
#define VIPS_FOREIGN_SAVE_GET_CLASS( obj ) \
(G_TYPE_INSTANCE_GET_CLASS( (obj), \
VIPS_TYPE_FOREIGN_SAVE, VipsForeignSaveClass ))
/**
* VipsSaveable:
* @VIPS_SAVEABLE_MONO: 1 band (eg. CSV)
* @VIPS_SAVEABLE_RGB: 1 or 3 bands (eg. PPM)
* @VIPS_SAVEABLE_RGBA: 1, 2, 3 or 4 bands (eg. PNG)
* @VIPS_SAVEABLE_RGBA_ONLY: 3 or 4 bands (eg. WEBP)
* @VIPS_SAVEABLE_RGB_CMYK: 1, 3 or 4 bands (eg. JPEG)
* @VIPS_SAVEABLE_ANY: any number of bands (eg. TIFF)
*
* See also: #VipsForeignSave.
*/
typedef enum {
VIPS_SAVEABLE_MONO,
VIPS_SAVEABLE_RGB,
VIPS_SAVEABLE_RGBA,
VIPS_SAVEABLE_RGBA_ONLY,
VIPS_SAVEABLE_RGB_CMYK,
VIPS_SAVEABLE_ANY,
VIPS_SAVEABLE_LAST
} VipsSaveable;
typedef struct _VipsForeignSave {
VipsForeign parent_object;
/* Don't attach metadata.
*/
gboolean strip;
/* If flattening out alpha, the background colour to use. Default to
* 0 (black).
*/
VipsArrayDouble *background;
/* Set to non-zero to set the page size for multi-page save.
*/
int page_height;
/*< public >*/
/* The image we are to save, as supplied by our caller.
*/
VipsImage *in;
/* @in converted to a saveable format (eg. 8-bit RGB) according to the
* instructions you give in the class fields below.
*
* This is the image you should actually write to the output.
*/
VipsImage *ready;
} VipsForeignSave;
typedef struct _VipsForeignSaveClass {
VipsForeignClass parent_class;
/*< public >*/
/* How this format treats bands.
*
* @saveable describes the bands that your saver can handle. For
* example, PPM images can have 1 or 3 bands (mono or RGB), so it
* uses #VIPS_SAVEABLE_RGB.
*/
VipsSaveable saveable;
/* How this format treats band formats.
*
* @format_table describes the band formats that your saver can
* handle. For each of the 10 #VipsBandFormat values, the array
* should give the format your saver will accept.
*/
VipsBandFormat *format_table;
/* The set of coding types this format can save. For example, jpeg can
* only save NONE, so has NONE TRUE and RAD and LABQ FALSE.
*
* Default NONE TRUE, RAD and LABQ FALSE.
*/
gboolean coding[VIPS_CODING_LAST];
} VipsForeignSaveClass;
/* Don't put spaces around void here, it breaks gtk-doc.
*/
GType vips_foreign_save_get_type(void);
const char *vips_foreign_find_save( const char *filename );
const char *vips_foreign_find_save_buffer( const char *suffix );
int vips_vipsload( const char *filename, VipsImage **out, ... )
__attribute__((sentinel));
int vips_vipssave( VipsImage *in, const char *filename, ... )
__attribute__((sentinel));
int vips_openslideload( const char *filename, VipsImage **out, ... )
__attribute__((sentinel));
int vips_jpegload( const char *filename, VipsImage **out, ... )
__attribute__((sentinel));
int vips_jpegload_buffer( void *buf, size_t len, VipsImage **out, ... )
__attribute__((sentinel));
int vips_jpegsave( VipsImage *in, const char *filename, ... )
__attribute__((sentinel));
int vips_jpegsave_buffer( VipsImage *in, void **buf, size_t *len, ... )
__attribute__((sentinel));
int vips_jpegsave_mime( VipsImage *in, ... )
__attribute__((sentinel));
/**
* VipsForeignWebpPreset:
* @VIPS_FOREIGN_WEBP_PRESET_DEFAULT: default preset
* @VIPS_FOREIGN_WEBP_PRESET_PICTURE: digital picture, like portrait, inner shot
* @VIPS_FOREIGN_WEBP_PRESET_PHOTO: outdoor photograph, with natural lighting
* @VIPS_FOREIGN_WEBP_PRESET_DRAWING: hand or line drawing, with high-contrast details
* @VIPS_FOREIGN_WEBP_PRESET_ICON: small-sized colorful images
* @VIPS_FOREIGN_WEBP_PRESET_TEXT: text-like
*
* Tune lossy encoder settings for different image types.
*/
typedef enum {
VIPS_FOREIGN_WEBP_PRESET_DEFAULT,
VIPS_FOREIGN_WEBP_PRESET_PICTURE,
VIPS_FOREIGN_WEBP_PRESET_PHOTO,
VIPS_FOREIGN_WEBP_PRESET_DRAWING,
VIPS_FOREIGN_WEBP_PRESET_ICON,
VIPS_FOREIGN_WEBP_PRESET_TEXT,
VIPS_FOREIGN_WEBP_PRESET_LAST
} VipsForeignWebpPreset;
int vips_webpload( const char *filename, VipsImage **out, ... )
__attribute__((sentinel));
int vips_webpload_buffer( void *buf, size_t len, VipsImage **out, ... )
__attribute__((sentinel));
int vips_webpsave( VipsImage *in, const char *filename, ... )
__attribute__((sentinel));
int vips_webpsave_buffer( VipsImage *in, void **buf, size_t *len, ... )
__attribute__((sentinel));
int vips_webpsave_mime( VipsImage *in, ... )
__attribute__((sentinel));
/**
* VipsForeignTiffCompression:
* @VIPS_FOREIGN_TIFF_COMPRESSION_NONE: no compression
* @VIPS_FOREIGN_TIFF_COMPRESSION_JPEG: jpeg compression
* @VIPS_FOREIGN_TIFF_COMPRESSION_DEFLATE: deflate (zip) compression
* @VIPS_FOREIGN_TIFF_COMPRESSION_PACKBITS: packbits compression
* @VIPS_FOREIGN_TIFF_COMPRESSION_CCITTFAX4: fax4 compression
* @VIPS_FOREIGN_TIFF_COMPRESSION_LZW: LZW compression
*
* The compression types supported by the tiff writer.
*
* Use @Q to set the jpeg compression level, default 75.
*
* Use @prediction to set the lzw or deflate prediction, default none.
*/
typedef enum {
VIPS_FOREIGN_TIFF_COMPRESSION_NONE,
VIPS_FOREIGN_TIFF_COMPRESSION_JPEG,
VIPS_FOREIGN_TIFF_COMPRESSION_DEFLATE,
VIPS_FOREIGN_TIFF_COMPRESSION_PACKBITS,
VIPS_FOREIGN_TIFF_COMPRESSION_CCITTFAX4,
VIPS_FOREIGN_TIFF_COMPRESSION_LZW,
VIPS_FOREIGN_TIFF_COMPRESSION_LAST
} VipsForeignTiffCompression;
/**
* VipsForeignTiffPredictor:
* @VIPS_FOREIGN_TIFF_PREDICTOR_NONE: no prediction
* @VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL: horizontal differencing
* @VIPS_FOREIGN_TIFF_PREDICTOR_FLOAT: float predictor
*
* The predictor can help deflate and lzw compression. The values are fixed by
* the tiff library.
*/
typedef enum {
VIPS_FOREIGN_TIFF_PREDICTOR_NONE = 1,
VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL = 2,
VIPS_FOREIGN_TIFF_PREDICTOR_FLOAT = 3,
VIPS_FOREIGN_TIFF_PREDICTOR_LAST
} VipsForeignTiffPredictor;
/**
* VipsForeignTiffResunit:
* @VIPS_FOREIGN_TIFF_RESUNIT_CM: use centimeters
* @VIPS_FOREIGN_TIFF_RESUNIT_INCH: use inches
*
* Use inches or centimeters as the resolution unit for a tiff file.
*/
typedef enum {
VIPS_FOREIGN_TIFF_RESUNIT_CM,
VIPS_FOREIGN_TIFF_RESUNIT_INCH,
VIPS_FOREIGN_TIFF_RESUNIT_LAST
} VipsForeignTiffResunit;
int vips_tiffload( const char *filename, VipsImage **out, ... )
__attribute__((sentinel));
int vips_tiffload_buffer( void *buf, size_t len, VipsImage **out, ... )
__attribute__((sentinel));
int vips_tiffsave( VipsImage *in, const char *filename, ... )
__attribute__((sentinel));
int vips_tiffsave_buffer( VipsImage *in, void **buf, size_t *len, ... )
__attribute__((sentinel));
int vips_openexrload( const char *filename, VipsImage **out, ... )
__attribute__((sentinel));
int vips_fitsload( const char *filename, VipsImage **out, ... )
__attribute__((sentinel));
int vips_fitssave( VipsImage *in, const char *filename, ... )
__attribute__((sentinel));
int vips_analyzeload( const char *filename, VipsImage **out, ... )
__attribute__((sentinel));
int vips_rawload( const char *filename, VipsImage **out,
int width, int height, int bands, ... )
__attribute__((sentinel));
int vips_rawsave( VipsImage *in, const char *filename, ... )
__attribute__((sentinel));
int vips_rawsave_fd( VipsImage *in, int fd, ... )
__attribute__((sentinel));
int vips_csvload( const char *filename, VipsImage **out, ... )
__attribute__((sentinel));
int vips_csvsave( VipsImage *in, const char *filename, ... )
__attribute__((sentinel));
int vips_matrixload( const char *filename, VipsImage **out, ... )
__attribute__((sentinel));
int vips_matrixsave( VipsImage *in, const char *filename, ... )
__attribute__((sentinel));
int vips_matrixprint( VipsImage *in, ... )
__attribute__((sentinel));
int vips_magickload( const char *filename, VipsImage **out, ... )
__attribute__((sentinel));
int vips_magickload_buffer( void *buf, size_t len, VipsImage **out, ... )
__attribute__((sentinel));
int vips_magicksave( VipsImage *in, const char *filename, ... )
__attribute__((sentinel));
int vips_magicksave_buffer( VipsImage *in, void **buf, size_t *len, ... )
__attribute__((sentinel));
/**
* VipsForeignPngFilter:
* @VIPS_FOREIGN_PNG_FILTER_NONE: no filtering
* @VIPS_FOREIGN_PNG_FILTER_SUB: difference to the left
* @VIPS_FOREIGN_PNG_FILTER_UP: difference up
* @VIPS_FOREIGN_PNG_FILTER_AVG: average of left and up
* @VIPS_FOREIGN_PNG_FILTER_PAETH: pick best neighbor predictor automatically
* @VIPS_FOREIGN_PNG_FILTER_ALL: adaptive
*
* http://www.w3.org/TR/PNG-Filters.html
* The values mirror those of png.h in libpng.
*/
typedef enum /*< flags >*/ {
VIPS_FOREIGN_PNG_FILTER_NONE = 0x08,
VIPS_FOREIGN_PNG_FILTER_SUB = 0x10,
VIPS_FOREIGN_PNG_FILTER_UP = 0x20,
VIPS_FOREIGN_PNG_FILTER_AVG = 0x40,
VIPS_FOREIGN_PNG_FILTER_PAETH = 0x80,
VIPS_FOREIGN_PNG_FILTER_ALL = 0xF8
} VipsForeignPngFilter;
int vips_pngload( const char *filename, VipsImage **out, ... )
__attribute__((sentinel));
int vips_pngload_buffer( void *buf, size_t len, VipsImage **out, ... )
__attribute__((sentinel));
int vips_pngsave( VipsImage *in, const char *filename, ... )
__attribute__((sentinel));
int vips_pngsave_buffer( VipsImage *in, void **buf, size_t *len, ... )
__attribute__((sentinel));
int vips_ppmload( const char *filename, VipsImage **out, ... )
__attribute__((sentinel));
int vips_ppmsave( VipsImage *in, const char *filename, ... )
__attribute__((sentinel));
int vips_matload( const char *filename, VipsImage **out, ... )
__attribute__((sentinel));
int vips_radload( const char *filename, VipsImage **out, ... )
__attribute__((sentinel));
int vips_radsave( VipsImage *in, const char *filename, ... )
__attribute__((sentinel));
int vips_radsave_buffer( VipsImage *in, void **buf, size_t *len, ... )
__attribute__((sentinel));
int vips_pdfload( const char *filename, VipsImage **out, ... )
__attribute__((sentinel));
int vips_pdfload_buffer( void *buf, size_t len, VipsImage **out, ... )
__attribute__((sentinel));
int vips_svgload( const char *filename, VipsImage **out, ... )
__attribute__((sentinel));
int vips_svgload_buffer( void *buf, size_t len, VipsImage **out, ... )
__attribute__((sentinel));
int vips_gifload( const char *filename, VipsImage **out, ... )
__attribute__((sentinel));
int vips_gifload_buffer( void *buf, size_t len, VipsImage **out, ... )
__attribute__((sentinel));
int vips_niftiload( const char *filename, VipsImage **out, ... )
__attribute__((sentinel));
int vips_niftisave( VipsImage *in, const char *filename, ... )
__attribute__((sentinel));
/**
* VipsForeignDzLayout:
* @VIPS_FOREIGN_DZ_LAYOUT_DZ: use DeepZoom directory layout
* @VIPS_FOREIGN_DZ_LAYOUT_ZOOMIFY: use Zoomify directory layout
* @VIPS_FOREIGN_DZ_LAYOUT_GOOGLE: use Google maps directory layout
*
* What directory layout and metadata standard to use.
*/
typedef enum {
VIPS_FOREIGN_DZ_LAYOUT_DZ,
VIPS_FOREIGN_DZ_LAYOUT_ZOOMIFY,
VIPS_FOREIGN_DZ_LAYOUT_GOOGLE,
VIPS_FOREIGN_DZ_LAYOUT_LAST
} VipsForeignDzLayout;
/**
* VipsForeignDzDepth:
* @VIPS_FOREIGN_DZ_DEPTH_ONEPIXEL: create layers down to 1x1 pixel
* @VIPS_FOREIGN_DZ_DEPTH_ONETILE: create layers down to 1x1 tile
* @VIPS_FOREIGN_DZ_DEPTH_ONE: only create a single layer
*
* How many pyramid layers to create.
*/
typedef enum {
VIPS_FOREIGN_DZ_DEPTH_ONEPIXEL,
VIPS_FOREIGN_DZ_DEPTH_ONETILE,
VIPS_FOREIGN_DZ_DEPTH_ONE,
VIPS_FOREIGN_DZ_DEPTH_LAST
} VipsForeignDzDepth;
/**
* VipsForeignDzContainer:
* @VIPS_FOREIGN_DZ_CONTAINER_FS: write tiles to the filesystem
* @VIPS_FOREIGN_DZ_CONTAINER_ZIP: write tiles to a zip file
*
* How many pyramid layers to create.
*/
typedef enum {
VIPS_FOREIGN_DZ_CONTAINER_FS,
VIPS_FOREIGN_DZ_CONTAINER_ZIP,
VIPS_FOREIGN_DZ_CONTAINER_LAST
} VipsForeignDzContainer;
int vips_dzsave( VipsImage *in, const char *name, ... )
__attribute__((sentinel));
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_FOREIGN_H*/

179
node_modules/sharp/vendor/include/vips/format.h generated vendored Normal file
View File

@ -0,0 +1,179 @@
/* Base type for supported image formats. Subclass this to add a new
* format.
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef IM_FORMAT_H
#define IM_FORMAT_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#define VIPS_TYPE_FORMAT (vips_format_get_type())
#define VIPS_FORMAT( obj ) \
(G_TYPE_CHECK_INSTANCE_CAST( (obj), \
VIPS_TYPE_FORMAT, VipsFormat ))
#define VIPS_FORMAT_CLASS( klass ) \
(G_TYPE_CHECK_CLASS_CAST( (klass), \
VIPS_TYPE_FORMAT, VipsFormatClass))
#define VIPS_IS_FORMAT( obj ) \
(G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_FORMAT ))
#define VIPS_IS_FORMAT_CLASS( klass ) \
(G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_FORMAT ))
#define VIPS_FORMAT_GET_CLASS( obj ) \
(G_TYPE_INSTANCE_GET_CLASS( (obj), \
VIPS_TYPE_FORMAT, VipsFormatClass ))
/* Image file properties.
*/
typedef enum {
VIPS_FORMAT_NONE = 0, /* No flags set */
VIPS_FORMAT_PARTIAL = 1, /* Lazy read OK (eg. tiled tiff) */
VIPS_FORMAT_BIGENDIAN = 2 /* Most-significant byte first */
} VipsFormatFlags;
/* Don't instantiate these things, just use the class stuff.
*/
typedef struct _VipsFormat {
VipsObject parent_object;
/*< public >*/
} VipsFormat;
typedef struct _VipsFormatClass {
VipsObjectClass parent_class;
/*< public >*/
/* Is a file in this format.
*/
gboolean (*is_a)( const char * );
/* Read just the header into the VipsImage.
*/
int (*header)( const char *, VipsImage * );
/* Load the whole image.
*/
int (*load)( const char *, VipsImage * );
/* Write the VipsImage to the file in this format.
*/
int (*save)( VipsImage *, const char * );
/* Get the flags for this file in this format.
*/
VipsFormatFlags (*get_flags)( const char * );
/* Loop over formats in this order, default 0. We need this because
* some formats can be read by several loaders (eg. tiff can be read
* by the libMagick loader as well as by the tiff loader), and we want
* to make sure the better loader comes first.
*/
int priority;
/* Null-terminated list of allowed suffixes, eg. ".tif", ".tiff".
*/
const char **suffs;
} VipsFormatClass;
GType vips_format_get_type( void );
/* Map over and find formats. This uses type introspection to loop over
* subclasses of VipsFormat.
*/
void *vips_format_map( VipsSListMap2Fn fn, void *a, void *b );
VipsFormatClass *vips_format_for_file( const char *filename );
VipsFormatClass *vips_format_for_name( const char *filename );
VipsFormatFlags vips_format_get_flags( VipsFormatClass *format,
const char *filename );
/* Read/write an image convenience functions.
*/
int vips_format_read( const char *filename, VipsImage *out );
int vips_format_write( VipsImage *in, const char *filename );
/* Low-level read/write operations.
*/
int im_jpeg2vips( const char *filename, VipsImage *out );
int im_bufjpeg2vips( void *buf, size_t len,
VipsImage *out, gboolean header_only );
int im_vips2jpeg( VipsImage *in, const char *filename );
int im_vips2mimejpeg( VipsImage *in, int qfac );
int im_vips2bufjpeg( VipsImage *in, VipsImage *out,
int qfac, char **obuf, int *olen );
int im_tiff2vips( const char *filename, VipsImage *out );
int im_vips2tiff( VipsImage *in, const char *filename );
int im_tile_cache( VipsImage *in, VipsImage *out,
int tile_width, int tile_height, int max_tiles );
int im_magick2vips( const char *filename, VipsImage *out );
int im_bufmagick2vips( void *buf, size_t len,
VipsImage *out, gboolean header_only );
int im_exr2vips( const char *filename, VipsImage *out );
int im_ppm2vips( const char *filename, VipsImage *out );
int im_vips2ppm( VipsImage *in, const char *filename );
int im_analyze2vips( const char *filename, VipsImage *out );
int im_csv2vips( const char *filename, VipsImage *out );
int im_vips2csv( VipsImage *in, const char *filename );
int im_png2vips( const char *filename, VipsImage *out );
int im_vips2png( VipsImage *in, const char *filename );
int im_vips2bufpng( VipsImage *in, VipsImage *out,
int compression, int interlace, char **obuf, size_t *olen );
int im_webp2vips( const char *filename, VipsImage *out );
int im_vips2webp( VipsImage *in, const char *filename );
int im_raw2vips( const char *filename, VipsImage *out,
int width, int height, int bpp, int offset );
int im_vips2raw( VipsImage *in, int fd );
int im_mat2vips( const char *filename, VipsImage *out );
int im_rad2vips( const char *filename, VipsImage *out );
int im_vips2rad( VipsImage *in, const char *filename );
int im_fits2vips( const char *filename, VipsImage *out );
int im_vips2fits( VipsImage *in, const char *filename );
int im_vips2dz( VipsImage *in, const char *filename );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*IM_FORMAT_H*/

59
node_modules/sharp/vendor/include/vips/freqfilt.h generated vendored Normal file
View File

@ -0,0 +1,59 @@
/* freq_filt.h
*
* 2/11/09
* - from proto.h
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_FREQFILT_H
#define VIPS_FREQFILT_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
int vips_fwfft( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_invfft( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_freqmult( VipsImage *in, VipsImage *mask, VipsImage **out, ... )
__attribute__((sentinel));
int vips_spectrum( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_phasecor( VipsImage *in1, VipsImage *in2, VipsImage **out, ... )
__attribute__((sentinel));
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_FREQFILT_H*/

81
node_modules/sharp/vendor/include/vips/gate.h generated vendored Normal file
View File

@ -0,0 +1,81 @@
/* Thread profiling.
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_GATE_H
#define VIPS_GATE_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#include <vips/vips.h>
#define VIPS_GATE_START( NAME ) \
G_STMT_START { \
if( vips__thread_profile ) \
vips__thread_gate_start( NAME ); \
} G_STMT_END
#define VIPS_GATE_STOP( NAME ) \
G_STMT_START { \
if( vips__thread_profile ) \
vips__thread_gate_stop( NAME ); \
} G_STMT_END
#define VIPS_GATE_MALLOC( SIZE ) \
G_STMT_START { \
if( vips__thread_profile ) \
vips__thread_malloc_free( (gint64) (SIZE) ); \
} G_STMT_END
#define VIPS_GATE_FREE( SIZE ) \
G_STMT_START { \
if( vips__thread_profile ) \
vips__thread_malloc_free( -((gint64) (SIZE)) ); \
} G_STMT_END
extern gboolean vips__thread_profile;
void vips_profile_set( gboolean profile );
void vips__thread_profile_attach( const char *thread_name );
void vips__thread_profile_detach( void );
void vips__thread_profile_stop( void );
void vips__thread_gate_start( const char *gate_name );
void vips__thread_gate_stop( const char *gate_name );
void vips__thread_malloc_free( gint64 size );
#endif /*VIPS_GATE_H*/
#ifdef __cplusplus
}
#endif /*__cplusplus*/

80
node_modules/sharp/vendor/include/vips/generate.h generated vendored Normal file
View File

@ -0,0 +1,80 @@
/* Generate pixels.
*
* J.Cupitt, 8/4/93
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_GENERATE_H
#define VIPS_GENERATE_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
typedef int (*VipsRegionWrite)( VipsRegion *region, VipsRect *area, void *a );
int vips_sink_disc( VipsImage *im, VipsRegionWrite write_fn, void *a );
int vips_sink( VipsImage *im,
VipsStartFn start_fn, VipsGenerateFn generate_fn, VipsStopFn stop_fn,
void *a, void *b );
int vips_sink_tile( VipsImage *im,
int tile_width, int tile_height,
VipsStartFn start_fn, VipsGenerateFn generate_fn, VipsStopFn stop_fn,
void *a, void *b );
typedef void (*VipsSinkNotify)( VipsImage *im, VipsRect *rect, void *a );
int vips_sink_screen( VipsImage *in, VipsImage *out, VipsImage *mask,
int tile_width, int tile_height, int max_tiles,
int priority,
VipsSinkNotify notify_fn, void *a );
int vips_sink_memory( VipsImage *im );
void *vips_start_one( VipsImage *out, void *a, void *b );
int vips_stop_one( void *seq, void *a, void *b );
void *vips_start_many( VipsImage *out, void *a, void *b );
int vips_stop_many( void *seq, void *a, void *b );
VipsImage **vips_allocate_input_array( VipsImage *out, ... )
__attribute__((sentinel));
int vips_image_generate( VipsImage *image,
VipsStartFn start_fn, VipsGenerateFn generate_fn, VipsStopFn stop_fn,
void *a, void *b
);
int vips_image_pipeline_array( VipsImage *image,
VipsDemandStyle hint, VipsImage **in );
int vips_image_pipelinev( VipsImage *image, VipsDemandStyle hint, ... )
__attribute__((sentinel));
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_GENERATE_H*/

222
node_modules/sharp/vendor/include/vips/header.h generated vendored Normal file
View File

@ -0,0 +1,222 @@
/* image header funcs
*
* 20/9/09
* - from proto.h
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_HEADER_H
#define VIPS_HEADER_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
/**
* VIPS_META_EXIF_NAME:
*
* The name that JPEG read and write operations use for the image's EXIF data.
*/
#define VIPS_META_EXIF_NAME "exif-data"
/**
* VIPS_META_XMP_NAME:
*
* The name that read and write operations use for the image's XMP data.
*/
#define VIPS_META_XMP_NAME "xmp-data"
/**
* VIPS_META_IPTC_NAME:
*
* The name that read and write operations use for the image's IPTC data.
*/
#define VIPS_META_IPTC_NAME "iptc-data"
/**
* VIPS_META_PHOTOSHOP_NAME:
*
* The name that TIFF read and write operations use for the image's
* TIFFTAG_PHOTOSHOP data.
*/
#define VIPS_META_PHOTOSHOP_NAME "photoshop-data"
/**
* VIPS_META_ICC_NAME:
*
* The name we use to attach an ICC profile. The file read and write
* operations for TIFF, JPEG, PNG and others use this item of metadata to
* attach and save ICC profiles. The profile is updated by the
* vips_icc_transform() operations.
*/
#define VIPS_META_ICC_NAME "icc-profile-data"
/**
* VIPS_META_IMAGEDESCRIPTION:
*
* The IMAGEDESCRIPTION tag. Often has useful metadata.
*/
#define VIPS_META_IMAGEDESCRIPTION "image-description"
/**
* VIPS_META_RESOLUTION_UNIT:
*
* The JPEG and TIFF read and write operations use this to record the
* file's preferred unit for resolution.
*/
#define VIPS_META_RESOLUTION_UNIT "resolution-unit"
/**
* VIPS_META_LOADER:
*
* Record the name of the original loader here. Handy for hinting file formats
* and for debugging.
*/
#define VIPS_META_LOADER "vips-loader"
/**
* VIPS_META_SEQUENTIAL:
*
* Images loaded via vips_sequential() have this int field defined. Some
* operations (eg. vips_shrinkv()) add extra caches if they see it on their
* input.
*/
#define VIPS_META_SEQUENTIAL "vips-sequential"
/**
* VIPS_META_ORIENTATION:
*
* The orientation tag for this image. An int from 1 - 8 using the standard
* exif/tiff meanings.
*
* * 1 - The 0th row represents the visual top of the image, and the 0th column
* represents the visual left-hand side.
* * 2 - The 0th row represents the visual top of the image, and the 0th column
* represents the visual right-hand side.
* * 3 - The 0th row represents the visual bottom of the image, and the 0th
* column represents the visual right-hand side.
* * 4 - The 0th row represents the visual bottom of the image, and the 0th
* column represents the visual left-hand side.
* * 5 - The 0th row represents the visual left-hand side of the image, and the
* 0th column represents the visual top.
* * 6 - The 0th row represents the visual right-hand side of the image, and the
* 0th column represents the visual top.
* * 7 - The 0th row represents the visual right-hand side of the image, and the
* 0th column represents the visual bottom.
* * 8 - The 0th row represents the visual left-hand side of the image, and the
* 0th column represents the visual bottom.
*/
#define VIPS_META_ORIENTATION "orientation"
/**
* VIPS_META_PAGE_HEIGHT:
*
* If set, the height of each page when this image was loaded. If you save an
* image with "page-height" set to a format that supports multiple pages, such
* as tiff, the image will be saved as a series of pages.
*/
#define VIPS_META_PAGE_HEIGHT "page-height"
/**
* VIPS_META_N_PAGES:
*
* If set, the number of pages in the original file.
*/
#define VIPS_META_N_PAGES "n-pages"
guint64 vips_format_sizeof( VipsBandFormat format );
guint64 vips_format_sizeof_unsafe( VipsBandFormat format );
int vips_image_get_width( const VipsImage *image );
int vips_image_get_height( const VipsImage *image );
int vips_image_get_bands( const VipsImage *image );
VipsBandFormat vips_image_get_format( const VipsImage *image );
VipsBandFormat vips_image_guess_format( const VipsImage *image );
VipsCoding vips_image_get_coding( const VipsImage *image );
VipsInterpretation vips_image_get_interpretation( const VipsImage *image );
VipsInterpretation vips_image_guess_interpretation( const VipsImage *image );
double vips_image_get_xres( const VipsImage *image );
double vips_image_get_yres( const VipsImage *image );
int vips_image_get_xoffset( const VipsImage *image );
int vips_image_get_yoffset( const VipsImage *image );
const char *vips_image_get_filename( const VipsImage *image );
const char *vips_image_get_mode( const VipsImage *image );
double vips_image_get_scale( const VipsImage *image );
double vips_image_get_offset( const VipsImage *image );
const void *vips_image_get_data( VipsImage *image );
void vips_image_init_fields( VipsImage *image,
int xsize, int ysize, int bands,
VipsBandFormat format, VipsCoding coding,
VipsInterpretation interpretation,
double xres, double yres );
void vips_image_set( VipsImage *image, const char *name, GValue *value );
int vips_image_get( const VipsImage *image,
const char *name, GValue *value_copy );
int vips_image_get_as_string( const VipsImage *image,
const char *name, char **out );
GType vips_image_get_typeof( const VipsImage *image, const char *name );
gboolean vips_image_remove( VipsImage *image, const char *name );
typedef void *(*VipsImageMapFn)( VipsImage *image,
const char *name, GValue *value, void *a );
void *vips_image_map( VipsImage *image, VipsImageMapFn fn, void *a );
gchar **vips_image_get_fields( VipsImage *image );
void vips_image_set_area( VipsImage *image,
const char *name, VipsCallbackFn free_fn, void *data );
int vips_image_get_area( const VipsImage *image,
const char *name, void **data );
void vips_image_set_blob( VipsImage *image, const char *name,
VipsCallbackFn free_fn, void *data, size_t length );
int vips_image_get_blob( const VipsImage *image, const char *name,
void **data, size_t *length );
int vips_image_get_int( const VipsImage *image, const char *name, int *out );
void vips_image_set_int( VipsImage *image, const char *name, int i );
int vips_image_get_double( const VipsImage *image,
const char *name, double *out );
void vips_image_set_double( VipsImage *image, const char *name, double d );
int vips_image_get_string( const VipsImage *image,
const char *name, const char **out );
void vips_image_set_string( VipsImage *image,
const char *name, const char *str );
void vips_image_print_field( const VipsImage *image, const char *field );
int vips_image_history_printf( VipsImage *image, const char *format, ... )
__attribute__((format(printf, 2, 3)));
int vips_image_history_args( VipsImage *image,
const char *name, int argc, char *argv[] );
const char *vips_image_get_history( VipsImage *image );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_HEADER_H*/

69
node_modules/sharp/vendor/include/vips/histogram.h generated vendored Normal file
View File

@ -0,0 +1,69 @@
/* histograms_lut.h
*
* 3/11/09
* - from proto.h
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_HISTOGRAM_H
#define VIPS_HISTOGRAM_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
int vips_maplut( VipsImage *in, VipsImage **out, VipsImage *lut, ... )
__attribute__((sentinel));
int vips_percent( VipsImage *in, double percent, int *threshold, ... )
__attribute__((sentinel));
int vips_stdif( VipsImage *in, VipsImage **out, int width, int height, ... )
__attribute__((sentinel));
int vips_hist_cum( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_hist_norm( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_hist_equal( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_hist_plot( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_hist_match( VipsImage *in, VipsImage *ref, VipsImage **out, ... )
__attribute__((sentinel));
int vips_hist_local( VipsImage *in, VipsImage **out,
int width, int height, ... )
__attribute__((sentinel));
int vips_hist_ismonotonic( VipsImage *in, gboolean *out, ... )
__attribute__((sentinel));
int vips_hist_entropy( VipsImage *in, double *out, ... )
__attribute__((sentinel));
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_HISTOGRAM_H*/

522
node_modules/sharp/vendor/include/vips/image.h generated vendored Normal file
View File

@ -0,0 +1,522 @@
/* VIPS image class.
*
* 7/7/09
* - from vips.h
* 2/3/11
* - move to GObject
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_IMAGE_H
#define VIPS_IMAGE_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
/* If you read MSB first, you get these two values.
* intel order: byte 0 = b6
* SPARC order: byte 0 = 08
*/
#define VIPS_MAGIC_INTEL (0xb6a6f208U)
#define VIPS_MAGIC_SPARC (0x08f2a6b6U)
/* We have a maximum value for a coordinate at various points for sanity
* checking. For example, vips_black() has a max with and height. We use int
* for width/height so we could go up to 2bn, but it's good to have a lower
* value set so we can see crazy numbers early.
*
* This was 1m for a while, but someone found a use for a 4m wide image.
*/
#define VIPS_MAX_COORD (10000000)
typedef enum {
VIPS_DEMAND_STYLE_ERROR = -1,
VIPS_DEMAND_STYLE_SMALLTILE,
VIPS_DEMAND_STYLE_FATSTRIP,
VIPS_DEMAND_STYLE_THINSTRIP,
VIPS_DEMAND_STYLE_ANY
} VipsDemandStyle;
/* Types of image descriptor we may have. The type field is advisory only: it
* does not imply that any fields in IMAGE have valid data.
*/
typedef enum {
VIPS_IMAGE_ERROR = -1,
VIPS_IMAGE_NONE, /* no type set */
VIPS_IMAGE_SETBUF, /* malloced memory array */
VIPS_IMAGE_SETBUF_FOREIGN, /* memory array, don't free on close */
VIPS_IMAGE_OPENIN, /* input from fd with a window */
VIPS_IMAGE_MMAPIN, /* memory mapped input file */
VIPS_IMAGE_MMAPINRW, /* memory mapped read/write file */
VIPS_IMAGE_OPENOUT, /* output to fd */
VIPS_IMAGE_PARTIAL /* partial image */
} VipsImageType;
typedef enum {
VIPS_INTERPRETATION_ERROR = -1,
VIPS_INTERPRETATION_MULTIBAND = 0,
VIPS_INTERPRETATION_B_W = 1,
VIPS_INTERPRETATION_HISTOGRAM = 10,
VIPS_INTERPRETATION_XYZ = 12,
VIPS_INTERPRETATION_LAB = 13,
VIPS_INTERPRETATION_CMYK = 15,
VIPS_INTERPRETATION_LABQ = 16,
VIPS_INTERPRETATION_RGB = 17,
VIPS_INTERPRETATION_CMC = 18,
VIPS_INTERPRETATION_LCH = 19,
VIPS_INTERPRETATION_LABS = 21,
VIPS_INTERPRETATION_sRGB = 22,
VIPS_INTERPRETATION_YXY = 23,
VIPS_INTERPRETATION_FOURIER = 24,
VIPS_INTERPRETATION_RGB16 = 25,
VIPS_INTERPRETATION_GREY16 = 26,
VIPS_INTERPRETATION_MATRIX = 27,
VIPS_INTERPRETATION_scRGB = 28,
VIPS_INTERPRETATION_HSV = 29,
VIPS_INTERPRETATION_LAST = 30
} VipsInterpretation;
typedef enum {
VIPS_FORMAT_NOTSET = -1,
VIPS_FORMAT_UCHAR = 0,
VIPS_FORMAT_CHAR = 1,
VIPS_FORMAT_USHORT = 2,
VIPS_FORMAT_SHORT = 3,
VIPS_FORMAT_UINT = 4,
VIPS_FORMAT_INT = 5,
VIPS_FORMAT_FLOAT = 6,
VIPS_FORMAT_COMPLEX = 7,
VIPS_FORMAT_DOUBLE = 8,
VIPS_FORMAT_DPCOMPLEX = 9,
VIPS_FORMAT_LAST = 10
} VipsBandFormat;
typedef enum {
VIPS_CODING_ERROR = -1,
VIPS_CODING_NONE = 0,
VIPS_CODING_LABQ = 2,
VIPS_CODING_RAD = 6,
VIPS_CODING_LAST = 7
} VipsCoding;
typedef enum {
VIPS_ACCESS_RANDOM,
VIPS_ACCESS_SEQUENTIAL,
VIPS_ACCESS_SEQUENTIAL_UNBUFFERED,
VIPS_ACCESS_LAST
} VipsAccess;
struct _VipsImage;
struct _VipsRegion;
typedef void *(*VipsStartFn)( struct _VipsImage *out, void *a, void *b );
typedef int (*VipsGenerateFn)( struct _VipsRegion *out,
void *seq, void *a, void *b, gboolean *stop );
typedef int (*VipsStopFn)( void *seq, void *a, void *b );
/* Struct we keep a record of execution time in. Passed to eval signal so
* it can assess progress.
*/
typedef struct _VipsProgress {
/*< private >*/
struct _VipsImage *im; /* Image we are part of */
/*< public >*/
int run; /* Time we have been running */
int eta; /* Estimated seconds of computation left */
gint64 tpels; /* Number of pels we expect to calculate */
gint64 npels; /* Number of pels calculated so far */
int percent; /* Percent complete */
GTimer *start; /* Start time */
} VipsProgress;
#define VIPS_TYPE_IMAGE (vips_image_get_type())
#define VIPS_IMAGE( obj ) \
(G_TYPE_CHECK_INSTANCE_CAST( (obj), \
VIPS_TYPE_IMAGE, VipsImage ))
#define VIPS_IMAGE_CLASS( klass ) \
(G_TYPE_CHECK_CLASS_CAST( (klass), \
VIPS_TYPE_IMAGE, VipsImageClass))
#define VIPS_IS_IMAGE( obj ) \
(G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_IMAGE ))
#define VIPS_IS_IMAGE_CLASS( klass ) \
(G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_IMAGE ))
#define VIPS_IMAGE_GET_CLASS( obj ) \
(G_TYPE_INSTANCE_GET_CLASS( (obj), \
VIPS_TYPE_IMAGE, VipsImageClass ))
typedef struct _VipsImage {
VipsObject parent_instance;
/*< private >*/
/* We have to keep these names for compatibility with the old API.
* Don't use them though, use vips_image_get_width() and friends.
*/
int Xsize; /* image width, in pixels */
int Ysize; /* image height, in pixels */
int Bands; /* number of image bands */
VipsBandFormat BandFmt; /* pixel format */
VipsCoding Coding; /* pixel coding */
VipsInterpretation Type;/* pixel interpretation */
double Xres; /* horizontal pixels per millimetre */
double Yres; /* vertical pixels per millimetre */
int Xoffset; /* image origin hint */
int Yoffset; /* image origin hint */
/* No longer used, the names are here for compat with very, very old
* code.
*/
int Length;
short Compression;
short Level;
int Bbits; /* was number of bits in this format */
/* Old code expects to see this member, newer code has a param on
* eval().
*/
VipsProgress *time;
/* Derived fields that some code can fiddle with. New code should use
* vips_image_get_history() and friends.
*/
char *Hist; /* don't use, see vips_image_get_history() */
char *filename; /* pointer to copy of filename */
VipsPel *data; /* start of image data for WIO */
int kill; /* set to non-zero to block eval */
/* Everything below this private and only used internally by
* VipsImage.
*/
/* During vips image read and write we need temporary float-sized
* fields in the struct for staging xres/yres. Don't use these any
* other time.
*/
float Xres_float;
float Yres_float;
char *mode; /* mode string passed to _new() */
VipsImageType dtype; /* descriptor type */
int fd; /* file descriptor */
void *baseaddr; /* pointer to the start of an mmap file */
size_t length; /* size of mmap area */
guint32 magic; /* magic from header, endian-ness of image */
/* Partial image stuff. All these fields are initialised
* to NULL and ignored unless set by vips_image_generate() etc.
*/
VipsStartFn start_fn;
VipsGenerateFn generate_fn;
VipsStopFn stop_fn;
void *client1; /* user arguments */
void *client2;
GMutex *sslock; /* start-stop lock */
GSList *regions; /* list of regions current for this image */
VipsDemandStyle dhint; /* demand style hint */
/* Extra user-defined fields ... see vips_image_get() etc.
*/
GHashTable *meta; /* GhashTable of GValue */
GSList *meta_traverse; /* traverse order for Meta */
/* Part of mmap() read ... the sizeof() the header we skip from the
* file start. Usually VIPS_SIZEOF_HEADER, but can be something else
* for binary file read.
*
* guint64 so that we can guarantee to work even on systems with
* strange ideas about large files.
*/
gint64 sizeof_header;
/* If this is a large disc image, don't map the whole thing, instead
* have a set of windows shared between the regions active on the
* image. List of VipsWindow.
*/
GSList *windows;
/* Upstream/downstream relationships, built from args to
* vips_demand_hint().
*
* We use these to invalidate downstream pixel buffers.
* Use 'serial' to spot circular dependencies.
*
* See also hint_set below.
*/
GSList *upstream;
GSList *downstream;
int serial;
/* Keep a list of recounted GValue strings so we can share hist
* efficiently.
*/
GSList *history_list;
/* The VipsImage (if any) we should signal eval progress on.
*/
struct _VipsImage *progress_signal;
/* Record the file length here. We use this to stop ourselves mapping
* things beyond the end of the file in the case that the file has
* been truncated.
*
* gint64 so that we can guarantee to work even on systems with
* strange ideas about large files.
*/
gint64 file_length;
/* Set this when vips_demand_hint_array() is called, and check in any
* operation that will demand pixels from the image.
*
* We use vips_demand_hint_array() to build the tree of
* upstream/downstream relationships, so it's a mandatory thing.
*/
gboolean hint_set;
/* Delete-on-close is hard to do with signals and callbacks since we
* really need to do this in finalize after the fd has been closed,
* but you can't emit signals then.
*
* Also keep a private copy of the filename string to be deleted,
* since image->filename will be freed in _dispose().
*/
gboolean delete_on_close;
char *delete_on_close_filename;
} VipsImage;
typedef struct _VipsImageClass {
VipsObjectClass parent_class;
/* Signals we emit.
*/
/* Evaluation is starting.
*/
void (*preeval)( VipsImage *image, VipsProgress *progress );
/* Evaluation progress.
*/
void (*eval)( VipsImage *image, VipsProgress *progress );
/* Evaluation is ending.
*/
void (*posteval)( VipsImage *image, VipsProgress *progress );
/* An image has been written to.
* Used by eg. vips_image_new_mode("x.jpg", "w") to do the
* final write to jpeg.
* Set *result to non-zero to indicate an error on write.
*/
void (*written)( VipsImage *image, int *result );
/* An image has been modified in some way and all caches
* need dropping.
*/
void (*invalidate)( VipsImage *image );
/* Minimise this pipeline.
*
* This is triggered (sometimes) at the end of eval to signal that
* we're probably done and that operations involved should try to
* minimise memory use by, for example, dropping caches.
*
* See vips_tilecache().
*/
void (*minimise)( VipsImage *image );
} VipsImageClass;
/* Don't put spaces around void here, it breaks gtk-doc.
*/
GType vips_image_get_type(void);
/* Has to be guint64 and not size_t/off_t since we have to be able to address
* huge images on platforms with 32-bit files.
*/
/* Pixel address calculation macros.
*/
#define VIPS_IMAGE_SIZEOF_ELEMENT( I ) \
(vips_format_sizeof_unsafe((I)->BandFmt))
#define VIPS_IMAGE_SIZEOF_PEL( I ) \
(VIPS_IMAGE_SIZEOF_ELEMENT( I ) * (I)->Bands)
#define VIPS_IMAGE_SIZEOF_LINE( I ) \
(VIPS_IMAGE_SIZEOF_PEL( I ) * (I)->Xsize)
#define VIPS_IMAGE_SIZEOF_IMAGE( I ) \
(VIPS_IMAGE_SIZEOF_LINE( I ) * (I)->Ysize)
#define VIPS_IMAGE_N_ELEMENTS( I ) \
((I)->Bands * (I)->Xsize)
#define VIPS_IMAGE_N_PELS( I ) \
((guint64) (I)->Xsize * (I)->Ysize)
/* If VIPS_DEBUG is defined, add bounds checking.
*/
#ifdef VIPS_DEBUG
#define VIPS_IMAGE_ADDR( I, X, Y ) \
( ((X) >= 0 && (X) < VIPS_IMAGE( I )->Xsize && \
(Y) >= 0 && (Y) < VIPS_IMAGE( I )->Ysize && \
VIPS_IMAGE( I )->data) ? \
(VIPS_IMAGE( I )->data + \
(Y) * VIPS_IMAGE_SIZEOF_LINE( I ) + \
(X) * VIPS_IMAGE_SIZEOF_PEL( I )) : \
(fprintf( stderr, \
"VIPS_IMAGE_ADDR: point out of bounds, " \
"file \"%s\", line %d\n" \
"(point x=%d, y=%d\n" \
" should have been within VipsRect left=%d, top=%d, " \
"width=%d, height=%d)\n", \
__FILE__, __LINE__, \
(X), (Y), \
0, 0, \
VIPS_IMAGE( I )->Xsize, \
VIPS_IMAGE( I )->Ysize ), (VipsPel *) NULL) \
)
#else /*!VIPS_DEBUG*/
#define VIPS_IMAGE_ADDR( I, X, Y ) \
((I)->data + \
(Y) * VIPS_IMAGE_SIZEOF_LINE( I ) + \
(X) * VIPS_IMAGE_SIZEOF_PEL( I ))
#endif /*VIPS_DEBUG*/
#ifdef VIPS_DEBUG
#define VIPS_MATRIX( I, X, Y ) \
((VIPS_IMAGE( I )->BandFmt == VIPS_FORMAT_DOUBLE && \
VIPS_IMAGE( I )->Bands == 1) ? \
((double *) VIPS_IMAGE_ADDR( I, X, Y )) : \
(fprintf( stderr, "VIPS_MATRIX: not a matrix image\n" ), \
(double *) NULL))
#else /*!VIPS_DEBUG*/
#define VIPS_MATRIX( I, X, Y ) \
((double *) VIPS_IMAGE_ADDR( I, X, Y ))
#endif /*VIPS_DEBUG*/
void vips_progress_set( gboolean progress );
void vips_image_invalidate_all( VipsImage *image );
void vips_image_minimise_all( VipsImage *image );
void vips_image_set_progress( VipsImage *image, gboolean progress );
char *vips_filename_get_filename( const char *vips_filename );
char *vips_filename_get_options( const char *vips_filename );
VipsImage *vips_image_new( void );
VipsImage *vips_image_new_memory( void );
VipsImage *vips_image_memory( void );
VipsImage *vips_image_new_from_file( const char *name, ... )
__attribute__((sentinel));
VipsImage *vips_image_new_from_file_RW( const char *filename );
VipsImage *vips_image_new_from_file_raw( const char *filename,
int xsize, int ysize, int bands, guint64 offset );
VipsImage *vips_image_new_from_memory( const void *data, size_t size,
int width, int height, int bands, VipsBandFormat format );
VipsImage *vips_image_new_from_memory_copy( const void *data, size_t size,
int width, int height, int bands, VipsBandFormat format );
VipsImage *vips_image_new_from_buffer( const void *buf, size_t len,
const char *option_string, ... )
__attribute__((sentinel));
VipsImage *vips_image_new_matrix( int width, int height );
VipsImage *vips_image_new_matrixv( int width, int height, ... );
VipsImage *vips_image_new_matrix_from_array( int width, int height,
const double *array, int size );
VipsImage *vips_image_matrix_from_array( int width, int height,
const double *array, int size );
VipsImage *vips_image_new_from_image( VipsImage *image, const double *c, int n );
VipsImage *vips_image_new_from_image1( VipsImage *image, double c );
void vips_image_set_delete_on_close( VipsImage *image,
gboolean delete_on_close );
guint64 vips_get_disc_threshold( void );
VipsImage *vips_image_new_temp_file( const char *format );
int vips_image_write( VipsImage *image, VipsImage *out );
int vips_image_write_to_file( VipsImage *image, const char *name, ... )
__attribute__((sentinel));
int vips_image_write_to_buffer( VipsImage *in,
const char *suffix, void **buf, size_t *size, ... )
__attribute__((sentinel));
void *vips_image_write_to_memory( VipsImage *in, size_t *size );
int vips_image_decode_predict( VipsImage *in,
int *bands, VipsBandFormat *format );
int vips_image_decode( VipsImage *in, VipsImage **out );
int vips_image_encode( VipsImage *in, VipsImage **out, VipsCoding coding );
gboolean vips_image_isMSBfirst( VipsImage *image );
gboolean vips_image_isfile( VipsImage *image );
gboolean vips_image_ispartial( VipsImage *image );
gboolean vips_image_hasalpha( VipsImage *image );
VipsImage *vips_image_copy_memory( VipsImage *image );
int vips_image_wio_input( VipsImage *image );
int vips_image_pio_input( VipsImage *image );
int vips_image_pio_output( VipsImage *image );
int vips_image_inplace( VipsImage *image );
int vips_image_write_prepare( VipsImage *image );
int vips_image_write_line( VipsImage *image, int ypos, VipsPel *linebuffer );
gboolean vips_band_format_isint( VipsBandFormat format );
gboolean vips_band_format_isuint( VipsBandFormat format );
gboolean vips_band_format_is8bit( VipsBandFormat format );
gboolean vips_band_format_isfloat( VipsBandFormat format );
gboolean vips_band_format_iscomplex( VipsBandFormat format );
int vips_system( const char *cmd_format, ... )
__attribute__((sentinel));
/* Defined in type.c but declared here, since they use VipsImage.
*/
VipsArrayImage *vips_array_image_new( VipsImage **array, int n );
VipsArrayImage *vips_array_image_newv( int n, ... );
VipsArrayImage *vips_array_image_new_from_string( const char *string,
VipsAccess flags );
VipsArrayImage *vips_array_image_empty( void );
VipsArrayImage *vips_array_image_append( VipsArrayImage *array,
VipsImage *image );
VipsImage **vips_array_image_get( VipsArrayImage *array, int *n );
VipsImage **vips_value_get_array_image( const GValue *value, int *n );
void vips_value_set_array_image( GValue *value, int n );
/* Defined in reorder.c, but really a function on image.
*/
int vips_reorder_prepare_many( VipsImage *image,
struct _VipsRegion **regions, VipsRect *r );
void vips_reorder_margin_hint( VipsImage *image, int margin );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_IMAGE_H*/

128
node_modules/sharp/vendor/include/vips/interpolate.h generated vendored Normal file
View File

@ -0,0 +1,128 @@
/* Various interpolators.
*
* J.Cupitt, 15/10/08
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_INTERPOLATE_H
#define VIPS_INTERPOLATE_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#define VIPS_TYPE_INTERPOLATE (vips_interpolate_get_type())
#define VIPS_INTERPOLATE( obj ) \
(G_TYPE_CHECK_INSTANCE_CAST( (obj), \
VIPS_TYPE_INTERPOLATE, VipsInterpolate ))
#define VIPS_INTERPOLATE_CLASS( klass ) \
(G_TYPE_CHECK_CLASS_CAST( (klass), \
VIPS_TYPE_INTERPOLATE, VipsInterpolateClass))
#define VIPS_IS_INTERPOLATE( obj ) \
(G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_INTERPOLATE ))
#define VIPS_IS_INTERPOLATE_CLASS( klass ) \
(G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_INTERPOLATE ))
#define VIPS_INTERPOLATE_GET_CLASS( obj ) \
(G_TYPE_INSTANCE_GET_CLASS( (obj), \
VIPS_TYPE_INTERPOLATE, VipsInterpolateClass ))
typedef struct _VipsInterpolate {
VipsObject parent_object;
} VipsInterpolate;
/* An interpolation function. This is a class method, but we have a lookup
* function for it to speed up dispatch. Write to the memory at "out",
* interpolate the value at position (x, y) in "in".
*/
typedef void (*VipsInterpolateMethod)( VipsInterpolate *interpolate,
void *out, VipsRegion *in, double x, double y );
typedef struct _VipsInterpolateClass {
VipsObjectClass parent_class;
/* Write to pixel out(x,y), interpolating from in(x,y). The caller has
* to set the regions up.
*/
VipsInterpolateMethod interpolate;
/* This interpolator needs a window this many pixels across and down.
*/
int (*get_window_size)( VipsInterpolate *interpolate );
/* Or just set this if you want a constant.
*/
int window_size;
/* Stencils are offset by this much. Default to window_size / 2 - 1
* (centering) if get_window_offset is NULL and window_offset is -1.
*/
int (*get_window_offset)( VipsInterpolate *interpolate );
int window_offset;
} VipsInterpolateClass;
/* Don't put spaces around void here, it breaks gtk-doc.
*/
GType vips_interpolate_get_type(void);
void vips_interpolate( VipsInterpolate *interpolate,
void *out, VipsRegion *in, double x, double y );
VipsInterpolateMethod vips_interpolate_get_method( VipsInterpolate *interpolate );
int vips_interpolate_get_window_size( VipsInterpolate *interpolate );
int vips_interpolate_get_window_offset( VipsInterpolate *interpolate );
/* How many bits of precision we keep for transformations, ie. how many
* pre-computed matricies we have.
*/
#define VIPS_TRANSFORM_SHIFT (6)
#define VIPS_TRANSFORM_SCALE (1 << VIPS_TRANSFORM_SHIFT)
/* How many bits of precision we keep for interpolation, ie. where the decimal
* is in the fixed-point tables. For 16-bit pixels, we need 16 bits for the
* data and 4 bits to add 16 values together. That leaves 12 bits for the
* fractional part.
*/
#define VIPS_INTERPOLATE_SHIFT (12)
#define VIPS_INTERPOLATE_SCALE (1 << VIPS_INTERPOLATE_SHIFT)
/* Convenience: return static interpolators, no need to unref.
*/
VipsInterpolate *vips_interpolate_nearest_static( void );
VipsInterpolate *vips_interpolate_bilinear_static( void );
/* Convenience: make an interpolator from a nickname. g_object_unref() when
* you're done with it.
*/
VipsInterpolate *vips_interpolate_new( const char *nickname );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_INTERPOLATE_H*/

50
node_modules/sharp/vendor/include/vips/intl.h generated vendored Normal file
View File

@ -0,0 +1,50 @@
/* i18n stuff for vips.
*/
#ifndef VIPS_INTL_H
#define VIPS_INTL_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
const char *vips__gettext( const char *msgid );
const char *vips__ngettext( const char *msgid,
const char *plural, unsigned long int n );
#ifdef ENABLE_NLS
#include <libintl.h>
#define _(String) vips__gettext(String)
/* ngettext may be defined as a macro if we're optimised.
*/
#ifdef ngettext
#undef ngettext
#endif /*ngettext*/
#define ngettext(String,Plural,number) vips__ngettext(String,Plural,number)
#ifdef gettext_noop
#define N_(String) gettext_noop(String)
#else
#define N_(String) (String)
#endif
#else /*!ENABLE_NLS*/
#define _(String) (String)
#define N_(String) (String)
#define textdomain(String) (String)
#define gettext(String) (String)
#define dgettext(Domain,String) (String)
#define dcgettext(Domain,String,Type) (String)
#define bindtextdomain(Domain,Directory) (Domain)
#define bind_textdomain_codeset(Domain,Codeset) (Codeset)
#define ngettext(S, P, N) ((N) == 1 ? (S) : (P))
#define dngettext(D, S, P, N) ngettext(S, P, N)
#endif /* ENABLE_NLS */
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /* VIPS_INTL_H */

124
node_modules/sharp/vendor/include/vips/mask.h generated vendored Normal file
View File

@ -0,0 +1,124 @@
/* mask.h
*
* 20/9/09
* - from proto.h
*/
/* All deprecated.
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef IM_MASK_H
#define IM_MASK_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
typedef struct im__INTMASK {
int xsize;
int ysize;
int scale;
int offset;
int *coeff;
char *filename;
} INTMASK;
typedef struct im__DOUBLEMASK {
int xsize;
int ysize;
double scale;
double offset;
double *coeff;
char *filename;
} DOUBLEMASK;
#define IM_MASK( M, X, Y ) ((M)->coeff[(X) + (Y) * (M)->xsize])
INTMASK *im_create_imask( const char *filename, int xsize, int ysize );
INTMASK *im_create_imaskv( const char *filename, int xsize, int ysize, ... );
DOUBLEMASK *im_create_dmask( const char *filename, int xsize, int ysize );
DOUBLEMASK *im_create_dmaskv( const char *filename, int xsize, int ysize, ... );
INTMASK *im_read_imask( const char *filename );
DOUBLEMASK *im_read_dmask( const char *filename );
void im_print_imask( INTMASK *in );
void im_print_dmask( DOUBLEMASK *in );
int im_write_imask( INTMASK *in );
int im_write_dmask( DOUBLEMASK *in );
int im_write_imask_name( INTMASK *in, const char *filename );
int im_write_dmask_name( DOUBLEMASK *in, const char *filename );
int im_free_imask( INTMASK *in );
int im_free_dmask( DOUBLEMASK *in );
INTMASK *im_log_imask( const char *filename, double sigma, double min_ampl );
DOUBLEMASK *im_log_dmask( const char *filename, double sigma, double min_ampl );
INTMASK *im_gauss_imask( const char *filename, double sigma, double min_ampl );
INTMASK *im_gauss_imask_sep( const char *filename,
double sigma, double min_ampl );
DOUBLEMASK *im_gauss_dmask( const char *filename,
double sigma, double min_ampl );
DOUBLEMASK *im_gauss_dmask_sep( const char *filename,
double sigma, double min_ampl );
INTMASK *im_dup_imask( INTMASK *in, const char *filename );
DOUBLEMASK *im_dup_dmask( DOUBLEMASK *in, const char *filename );
INTMASK *im_scale_dmask( DOUBLEMASK *in, const char *filename );
void im_norm_dmask( DOUBLEMASK *mask );
DOUBLEMASK *im_imask2dmask( INTMASK *in, const char *filename );
INTMASK *im_dmask2imask( DOUBLEMASK *in, const char *filename );
INTMASK *im_rotate_imask90( INTMASK *in, const char *filename );
INTMASK *im_rotate_imask45( INTMASK *in, const char *filename );
DOUBLEMASK *im_rotate_dmask90( DOUBLEMASK *in, const char *filename );
DOUBLEMASK *im_rotate_dmask45( DOUBLEMASK *in, const char *filename );
DOUBLEMASK *im_mattrn( DOUBLEMASK *in, const char *filename );
DOUBLEMASK *im_matcat( DOUBLEMASK *top, DOUBLEMASK *bottom,
const char *filename );
DOUBLEMASK *im_matmul( DOUBLEMASK *in1, DOUBLEMASK *in2, const char *filename );
DOUBLEMASK *im_lu_decomp( const DOUBLEMASK *mat, const char *filename );
int im_lu_solve( const DOUBLEMASK *lu, double *vec );
DOUBLEMASK *im_matinv( const DOUBLEMASK *mat, const char *filename );
int im_matinv_inplace( DOUBLEMASK *mat );
DOUBLEMASK *im_local_dmask( struct _VipsImage *out, DOUBLEMASK *mask );
INTMASK *im_local_imask( struct _VipsImage *out, INTMASK *mask );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*IM_MASK_H*/

85
node_modules/sharp/vendor/include/vips/memory.h generated vendored Normal file
View File

@ -0,0 +1,85 @@
/* memory utilities
*
* J.Cupitt, 8/4/93
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_MEMORY_H
#define VIPS_MEMORY_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#define VIPS_FREEF( F, S ) G_STMT_START { \
if( S ) { \
(void) F( (S) ); \
(S) = 0; \
} \
} G_STMT_END
#define VIPS_FREE( S ) VIPS_FREEF( g_free, (S) );
#define VIPS_SETSTR( S, V ) \
G_STMT_START { \
const char *sst = (V); \
\
if( (S) != sst ) { \
if( !(S) || !sst || strcmp( (S), sst ) != 0 ) { \
VIPS_FREE( S ); \
if( sst ) \
(S) = g_strdup( sst ); \
} \
} \
} G_STMT_END
#define VIPS_NEW( OBJ, T ) \
((T *) vips_malloc( VIPS_OBJECT( OBJ ), sizeof( T )))
#define VIPS_ARRAY( OBJ, N, T ) \
((T *) vips_malloc( VIPS_OBJECT( OBJ ), (N) * sizeof( T )))
void *vips_malloc( VipsObject *object, size_t size );
char *vips_strdup( VipsObject *object, const char *str );
int vips_free( void *buf );
void vips_tracked_free( void *s );
void *vips_tracked_malloc( size_t size );
size_t vips_tracked_get_mem( void );
size_t vips_tracked_get_mem_highwater( void );
int vips_tracked_get_allocs( void );
int vips_tracked_open( const char *pathname, int flags, ... );
int vips_tracked_close( int fd );
int vips_tracked_get_files( void );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*IM_MEMORY_H*/

67
node_modules/sharp/vendor/include/vips/morphology.h generated vendored Normal file
View File

@ -0,0 +1,67 @@
/* morphology.h
*
* 20/9/09
* - from proto.h
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_MORPHOLOGY_H
#define VIPS_MORPHOLOGY_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
typedef enum {
VIPS_OPERATION_MORPHOLOGY_ERODE,
VIPS_OPERATION_MORPHOLOGY_DILATE,
VIPS_OPERATION_MORPHOLOGY_LAST
} VipsOperationMorphology;
int vips_morph( VipsImage *in, VipsImage **out, VipsImage *mask,
VipsOperationMorphology morph, ... )
__attribute__((sentinel));
int vips_rank( VipsImage *in, VipsImage **out,
int width, int height, int index, ... )
__attribute__((sentinel));
int vips_median( VipsImage *in, VipsImage **out, int size, ... )
__attribute__((sentinel));
int vips_countlines( VipsImage *in, double *nolines,
VipsDirection direction, ... )
__attribute__((sentinel));
int vips_labelregions( VipsImage *in, VipsImage **mask, ... )
__attribute__((sentinel));
int vips_fill_nearest( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_MORPHOLOGY_H*/

70
node_modules/sharp/vendor/include/vips/mosaicing.h generated vendored Normal file
View File

@ -0,0 +1,70 @@
/* mosaicing.h
*
* 20/9/09
* - from proto.h
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef IM_MOSAICING_H
#define IM_MOSAICING_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
int vips_merge( VipsImage *ref, VipsImage *sec, VipsImage **out,
VipsDirection direction, int dx, int dy, ... )
__attribute__((sentinel));
int vips_mosaic( VipsImage *ref, VipsImage *sec, VipsImage **out,
VipsDirection direction, int xref, int yref, int xsec, int ysec, ... )
__attribute__((sentinel));
int vips_mosaic1( VipsImage *ref, VipsImage *sec, VipsImage **out,
VipsDirection direction,
int xr1, int yr1, int xs1, int ys1,
int xr2, int yr2, int xs2, int ys2, ... )
__attribute__((sentinel));
int vips_match( VipsImage *ref, VipsImage *sec, VipsImage **out,
int xr1, int yr1, int xs1, int ys1,
int xr2, int yr2, int xs2, int ys2, ... )
__attribute__((sentinel));
int vips_globalbalance( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_remosaic( VipsImage *in, VipsImage **out,
const char *old_str, const char *new_str, ... )
__attribute__((sentinel));
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*IM_MOSAICING_H*/

648
node_modules/sharp/vendor/include/vips/object.h generated vendored Normal file
View File

@ -0,0 +1,648 @@
/* abstract base class for all vips objects
*/
/*
Copyright (C) 1991-2003 The National Gallery
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_OBJECT_H
#define VIPS_OBJECT_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
/* Handy!
*/
#ifdef VIPS_DEBUG
#define VIPS_UNREF( X ) G_STMT_START { \
if( X ) { \
g_assert( G_OBJECT( X )->ref_count > 0 ); \
g_object_unref( X ); \
(X) = 0; \
} \
} G_STMT_END
#else /*!VIPS_DEBUG*/
#define VIPS_UNREF( X ) VIPS_FREEF( g_object_unref, (X) )
#endif /*VIPS_DEBUG*/
typedef struct _VipsObject VipsObject;
typedef struct _VipsObjectClass VipsObjectClass;
/* Track extra stuff for arguments to objects
*/
typedef enum /*< flags >*/ {
VIPS_ARGUMENT_NONE = 0,
VIPS_ARGUMENT_REQUIRED = 1,
VIPS_ARGUMENT_CONSTRUCT = 2,
VIPS_ARGUMENT_SET_ONCE = 4,
VIPS_ARGUMENT_SET_ALWAYS = 8,
VIPS_ARGUMENT_INPUT = 16,
VIPS_ARGUMENT_OUTPUT = 32,
VIPS_ARGUMENT_DEPRECATED = 64,
VIPS_ARGUMENT_MODIFY = 128
} VipsArgumentFlags;
/* Useful flag combinations. User-visible ones are:
VIPS_ARGUMENT_REQUIRED_INPUT Eg. the "left" argument for an add operation
VIPS_ARGUMENT_OPTIONAL_INPUT Eg. the "caption" for an object
VIPS_ARGUMENT_REQUIRED_OUTPUT Eg. the "result" of an add operation
VIPS_ARGUMENT_OPTIONAL_OUTPUT Eg. the x pos of the image minimum
Other combinations are used internally, eg. supplying the cast-table for an
arithmetic operation
*/
#define VIPS_ARGUMENT_REQUIRED_INPUT \
(VIPS_ARGUMENT_INPUT | \
VIPS_ARGUMENT_REQUIRED | \
VIPS_ARGUMENT_CONSTRUCT)
#define VIPS_ARGUMENT_OPTIONAL_INPUT \
(VIPS_ARGUMENT_INPUT | \
VIPS_ARGUMENT_CONSTRUCT)
#define VIPS_ARGUMENT_REQUIRED_OUTPUT \
(VIPS_ARGUMENT_OUTPUT | \
VIPS_ARGUMENT_REQUIRED | \
VIPS_ARGUMENT_CONSTRUCT)
#define VIPS_ARGUMENT_OPTIONAL_OUTPUT \
(VIPS_ARGUMENT_OUTPUT | \
VIPS_ARGUMENT_CONSTRUCT)
#define VIPS_ARG_IMAGE( CLASS, NAME, PRIORITY, LONG, DESC, FLAGS, OFFSET ) { \
GParamSpec *pspec; \
\
pspec = g_param_spec_object( (NAME), (LONG), (DESC), \
VIPS_TYPE_IMAGE, \
(GParamFlags) (G_PARAM_READWRITE) ); \
g_object_class_install_property( G_OBJECT_CLASS( CLASS ), \
vips_argument_get_id(), pspec ); \
vips_object_class_install_argument( VIPS_OBJECT_CLASS( CLASS ), \
pspec, (VipsArgumentFlags) (FLAGS), (PRIORITY), (OFFSET) ); \
}
#define VIPS_ARG_INTERPOLATE( CLASS, NAME, PRIORITY, LONG, DESC, FLAGS, OFFSET ) { \
GParamSpec *pspec; \
\
pspec = g_param_spec_object( (NAME), (LONG), (DESC), \
VIPS_TYPE_INTERPOLATE, \
(GParamFlags) (G_PARAM_READWRITE) ); \
g_object_class_install_property( G_OBJECT_CLASS( CLASS ), \
vips_argument_get_id(), pspec ); \
vips_object_class_install_argument( VIPS_OBJECT_CLASS( CLASS ), \
pspec, (VipsArgumentFlags) (FLAGS), (PRIORITY), (OFFSET) ); \
}
#define VIPS_ARG_BOOL( CLASS, NAME, PRIORITY, LONG, DESC, \
FLAGS, OFFSET, VALUE ) { \
GParamSpec *pspec; \
\
pspec = g_param_spec_boolean( (NAME), (LONG), (DESC), \
(VALUE), \
(GParamFlags) (G_PARAM_READWRITE) ); \
g_object_class_install_property( G_OBJECT_CLASS( CLASS ), \
vips_argument_get_id(), pspec ); \
vips_object_class_install_argument( VIPS_OBJECT_CLASS( CLASS ), \
pspec, (VipsArgumentFlags) (FLAGS), (PRIORITY), (OFFSET) ); \
}
#define VIPS_ARG_DOUBLE( CLASS, NAME, PRIORITY, LONG, DESC, \
FLAGS, OFFSET, MIN, MAX, VALUE ) { \
GParamSpec *pspec; \
\
pspec = g_param_spec_double( (NAME), (LONG), (DESC), \
(MIN), (MAX), (VALUE), \
(GParamFlags) (G_PARAM_READWRITE) );\
g_object_class_install_property( G_OBJECT_CLASS( CLASS ), \
vips_argument_get_id(), pspec ); \
vips_object_class_install_argument( VIPS_OBJECT_CLASS( CLASS ), \
pspec, (VipsArgumentFlags) (FLAGS), (PRIORITY), (OFFSET) ); \
}
#define VIPS_ARG_BOXED( CLASS, NAME, PRIORITY, LONG, DESC, \
FLAGS, OFFSET, TYPE ) { \
GParamSpec *pspec; \
\
pspec = g_param_spec_boxed( (NAME), (LONG), (DESC), \
(TYPE), \
(GParamFlags) (G_PARAM_READWRITE) );\
g_object_class_install_property( G_OBJECT_CLASS( CLASS ), \
vips_argument_get_id(), pspec ); \
vips_object_class_install_argument( VIPS_OBJECT_CLASS( CLASS ), \
pspec, (VipsArgumentFlags) (FLAGS), (PRIORITY), (OFFSET) ); \
}
#define VIPS_ARG_INT( CLASS, NAME, PRIORITY, LONG, DESC, \
FLAGS, OFFSET, MIN, MAX, VALUE ) { \
GParamSpec *pspec; \
\
pspec = g_param_spec_int( (NAME), (LONG), (DESC), \
(MIN), (MAX), (VALUE), \
(GParamFlags) (G_PARAM_READWRITE) );\
g_object_class_install_property( G_OBJECT_CLASS( CLASS ), \
vips_argument_get_id(), pspec ); \
vips_object_class_install_argument( VIPS_OBJECT_CLASS( CLASS ), \
pspec, (VipsArgumentFlags) (FLAGS), (PRIORITY), (OFFSET) ); \
}
#define VIPS_ARG_UINT64( CLASS, NAME, PRIORITY, LONG, DESC, \
FLAGS, OFFSET, MIN, MAX, VALUE ) { \
GParamSpec *pspec; \
\
pspec = g_param_spec_uint64( (NAME), (LONG), (DESC), \
(MIN), (MAX), (VALUE), \
(GParamFlags) (G_PARAM_READWRITE) );\
g_object_class_install_property( G_OBJECT_CLASS( CLASS ), \
vips_argument_get_id(), pspec ); \
vips_object_class_install_argument( VIPS_OBJECT_CLASS( CLASS ), \
pspec, (VipsArgumentFlags) (FLAGS), (PRIORITY), (OFFSET) ); \
}
#define VIPS_ARG_ENUM( CLASS, NAME, PRIORITY, LONG, DESC, \
FLAGS, OFFSET, TYPE, VALUE ) { \
GParamSpec *pspec; \
\
pspec = g_param_spec_enum( (NAME), (LONG), (DESC), \
(TYPE), (VALUE), \
(GParamFlags) (G_PARAM_READWRITE) );\
g_object_class_install_property( G_OBJECT_CLASS( CLASS ), \
vips_argument_get_id(), pspec ); \
vips_object_class_install_argument( VIPS_OBJECT_CLASS( CLASS ), \
pspec, (VipsArgumentFlags) (FLAGS), (PRIORITY), (OFFSET) ); \
}
#define VIPS_ARG_FLAGS( CLASS, NAME, PRIORITY, LONG, DESC, \
FLAGS, OFFSET, TYPE, VALUE ) { \
GParamSpec *pspec; \
\
pspec = g_param_spec_flags( (NAME), (LONG), (DESC), \
(TYPE), (VALUE), \
(GParamFlags) (G_PARAM_READWRITE) );\
g_object_class_install_property( G_OBJECT_CLASS( CLASS ), \
vips_argument_get_id(), pspec ); \
vips_object_class_install_argument( VIPS_OBJECT_CLASS( CLASS ), \
pspec, (VipsArgumentFlags) (FLAGS), (PRIORITY), (OFFSET) ); \
}
#define VIPS_ARG_STRING( CLASS, NAME, PRIORITY, LONG, DESC, FLAGS, OFFSET, \
VALUE ) { \
GParamSpec *pspec; \
\
pspec = g_param_spec_string( (NAME), (LONG), (DESC), \
(VALUE), \
(GParamFlags) (G_PARAM_READWRITE) ); \
g_object_class_install_property( G_OBJECT_CLASS( CLASS ), \
vips_argument_get_id(), pspec ); \
vips_object_class_install_argument( VIPS_OBJECT_CLASS( CLASS ), \
pspec, (VipsArgumentFlags) (FLAGS), (PRIORITY), (OFFSET) ); \
}
#define VIPS_ARG_POINTER( CLASS, NAME, PRIORITY, LONG, DESC, FLAGS, OFFSET ) { \
GParamSpec *pspec; \
\
pspec = g_param_spec_pointer( (NAME), (LONG), (DESC), \
(GParamFlags) (G_PARAM_READWRITE) ); \
g_object_class_install_property( gobject_class, \
vips_argument_get_id(), pspec ); \
vips_object_class_install_argument( VIPS_OBJECT_CLASS( CLASS ), \
pspec, (VipsArgumentFlags) (FLAGS), (PRIORITY), (OFFSET) ); \
}
/* Keep one of these for every argument.
*/
typedef struct _VipsArgument {
GParamSpec *pspec; /* pspec for this argument */
/* More stuff, see below */
} VipsArgument;
/* Keep one of these in the class struct for every argument.
*/
typedef struct _VipsArgumentClass {
VipsArgument parent;
/* The class of the object we are an arg for.
*/
VipsObjectClass *object_class;
VipsArgumentFlags flags;
int priority; /* Order args by this */
guint offset; /* G_STRUCT_OFFSET of member in object */
} VipsArgumentClass;
/* Keep one of these in the object struct for every argument instance.
*/
typedef struct _VipsArgumentInstance {
VipsArgument parent;
/* The class we are part of.
*/
VipsArgumentClass *argument_class;
/* The object we are attached to.
*/
VipsObject *object;
/* Has been set.
*/
gboolean assigned;
/* If this is an output argument, keep the id of our "close" handler
* here.
*/
gulong close_id;
/* We need to listen for "invalidate" on input images and send our own
* "invalidate" out. If we go, we need to disconnect.
*/
gulong invalidate_id;
} VipsArgumentInstance;
/* Need to look up our VipsArgument structs from a pspec. Just hash the
* pointer (ie. we assume pspecs are never shared, is this correct?)
*/
typedef GHashTable VipsArgumentTable;
int vips_argument_get_id( void );
void vips__object_set_member( VipsObject *object, GParamSpec *pspec,
GObject **member, GObject *argument );
typedef void *(*VipsArgumentMapFn)( VipsObject *object, GParamSpec *pspec,
VipsArgumentClass *argument_class,
VipsArgumentInstance *argument_instance, void *a, void *b );
void *vips_argument_map( VipsObject *object,
VipsArgumentMapFn fn, void *a, void *b );
int vips_object_get_args( VipsObject *object,
const char ***names, int **flags, int *n_args );
typedef void *(*VipsArgumentClassMapFn)( VipsObjectClass *object_class,
GParamSpec *pspec,
VipsArgumentClass *argument_class, void *a, void *b );
void *vips_argument_class_map( VipsObjectClass *object_class,
VipsArgumentClassMapFn fn, void *a, void *b );
gboolean vips_argument_class_needsstring( VipsArgumentClass *argument_class );
int vips_object_get_argument( VipsObject *object, const char *name,
GParamSpec **pspec,
VipsArgumentClass **argument_class,
VipsArgumentInstance **argument_instance );
gboolean vips_object_argument_isset( VipsObject *object, const char *name );
VipsArgumentFlags vips_object_get_argument_flags( VipsObject *object,
const char *name );
int vips_object_get_argument_priority( VipsObject *object, const char *name );
/* We have to loop over an objects args in several places, and we can't always
* use vips_argument_map(), the preferred looper. Have the loop code as a
* macro as well for these odd cases.
*/
#define VIPS_ARGUMENT_FOR_ALL( OBJECT, PSPEC, ARG_CLASS, ARG_INSTANCE ) { \
VipsObjectClass *object_class = VIPS_OBJECT_GET_CLASS( OBJECT ); \
GSList *p; \
\
for( p = object_class->argument_table_traverse; p; p = p->next ) { \
VipsArgumentClass *ARG_CLASS = \
(VipsArgumentClass *) p->data; \
VipsArgument *argument = (VipsArgument *) argument_class; \
GParamSpec *PSPEC = argument->pspec; \
VipsArgumentInstance *ARG_INSTANCE __attribute__ ((unused)) = \
vips__argument_get_instance( argument_class, \
VIPS_OBJECT( OBJECT ) ); \
#define VIPS_ARGUMENT_FOR_ALL_END } }
/* And some macros to collect args from a va list.
*
* Use something like this:
GParamSpec *pspec;
VipsArgumentClass *argument_class;
VipsArgumentInstance *argument_instance;
if( vips_object_get_argument( VIPS_OBJECT( operation ), name,
&pspec, &argument_class, &argument_instance ) )
return( -1 );
VIPS_ARGUMENT_COLLECT_SET( pspec, argument_class, ap );
GValue value holds the value of an input argument, do
something with it
VIPS_ARGUMENT_COLLECT_GET( pspec, argument_class, ap );
void **arg points to where to write an output argument
VIPS_ARGUMENT_COLLECT_END
*/
#define VIPS_ARGUMENT_COLLECT_SET( PSPEC, ARG_CLASS, AP ) \
if( (ARG_CLASS->flags & VIPS_ARGUMENT_INPUT) ) { \
GValue value = { 0, }; \
gchar *error = NULL; \
\
/* Input args are given inline, eg. ("factor", 12.0) \
* and must be collected. \
*/ \
g_value_init( &value, G_PARAM_SPEC_VALUE_TYPE( PSPEC ) ); \
G_VALUE_COLLECT( &value, AP, 0, &error ); \
\
/* Don't bother with the error message. \
*/ \
if( error ) { \
VIPS_DEBUG_MSG( "VIPS_OBJECT_COLLECT_SET: err\n" ); \
g_free( error ); \
}
#define VIPS_ARGUMENT_COLLECT_GET( PSPEC, ARG_CLASS, AP ) \
g_value_unset( &value ); \
} \
else if( (ARG_CLASS->flags & VIPS_ARGUMENT_OUTPUT) ) { \
void **arg __attribute__ ((unused)); \
\
/* Output args are a pointer to where to send the \
* result. \
*/ \
arg = va_arg( AP, void ** );
#define VIPS_ARGUMENT_COLLECT_END \
}
#define VIPS_TYPE_OBJECT (vips_object_get_type())
#define VIPS_OBJECT( obj ) \
(G_TYPE_CHECK_INSTANCE_CAST( (obj), VIPS_TYPE_OBJECT, VipsObject ))
#define VIPS_OBJECT_CLASS( klass ) \
(G_TYPE_CHECK_CLASS_CAST( (klass), VIPS_TYPE_OBJECT, VipsObjectClass))
#define VIPS_IS_OBJECT( obj ) \
(G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_OBJECT ))
#define VIPS_IS_OBJECT_CLASS( klass ) \
(G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_OBJECT ))
#define VIPS_OBJECT_GET_CLASS( obj ) \
(G_TYPE_INSTANCE_GET_CLASS( (obj), VIPS_TYPE_OBJECT, VipsObjectClass ))
struct _VipsObject {
GObject parent_instance;
/* Set after ->build() has run succesfully: construct is fully done
* and checked.
*/
gboolean constructed;
/* Set for static objects which are allocated at startup and never
* freed. These objects are ommitted from leak reports.
*/
gboolean static_object;
/* Table of argument instances for this class and any derived classes.
*/
VipsArgumentTable *argument_table;
/* Class properties (see below), duplicated in the instance so we can
* get at them easily via the property system.
*/
char *nickname;
char *description;
/* The pre/post/close callbacks are all fire-once.
*/
gboolean preclose;
gboolean close;
gboolean postclose;
/* Total memory allocated relative to this object, handy for
* profiling.
*/
size_t local_memory;
};
struct _VipsObjectClass {
GObjectClass parent_class;
/* Build the object ... all argument properties have been set,
* now build the thing.
*/
int (*build)( VipsObject *object );
/* Just after build ... the object is fully ready for work.
*/
int (*postbuild)( VipsObject *object );
/* Try to print something about the class, handy for help displays.
* Keep to one line.
*/
void (*summary_class)( struct _VipsObjectClass *cls, VipsBuf *buf );
/* Try to print a one-line summary for the object, the user can see
* this output via things like "header fred.tif", --vips-cache-trace,
* etc.
*/
void (*summary)( VipsObject *object, VipsBuf *buf );
/* Try to print everything about the object, handy for debugging.
*/
void (*dump)( VipsObject *object, VipsBuf *buf );
/* Sanity-check the object. Print messages and stuff.
* Handy for debugging.
*/
void (*sanity)( VipsObject *object, VipsBuf *buf );
/* Rewind. Save and restore any stuff that needs to survive a
* dispose().
*/
void (*rewind)( VipsObject *object );
/* Just before close, everything is still alive.
*/
void (*preclose)( VipsObject *object );
/* Close, time to free stuff.
*/
void (*close)( VipsObject *object );
/* Post-close, everything is dead, except the VipsObject pointer.
* Useful for eg. deleting the file associated with a temp image.
*/
void (*postclose)( VipsObject *object );
/* The CLI interface. Implement these four to get CLI input and output
* for your object.
*/
/* Given a command-line arg (eg. a filename), make an instance of the
* object. Just do the g_object_new(), don't call _build().
*
* Don't call this directly, see vips_object_new_from_string().
*/
VipsObject *(*new_from_string)( const char *string );
/* The inverse of ^^. Given an object, output what ->new_from_string()
* would have been given to make that object.
*/
void (*to_string)( VipsObject *object, VipsBuf *buf );
/* Does this output arg need an arg from the command line? Image
* output, for example, needs a filename to write to.
*/
gboolean output_needs_arg;
/* Write the object to the string. Return 0 for success, or -1 on
* error, setting vips_error(). string is NULL if output_needs_arg()
* was FALSE.
*/
int (*output_to_arg)( VipsObject *object, const char *string );
/* Class nickname, eg. "VipsInterpolateBicubic" has "bicubic" as a
* nickname. Not internationalised.
*/
const char *nickname;
/* Class description. Used for help messages, so internationalised.
*/
const char *description;
/* Hash from pspec to VipsArgumentClass.
*
* This records the VipsArgumentClass for every pspec used in
* VipsObject and any subclass (ie. everywhere), so it's huge. Don't
* loop over this hash! Fine for lookups though.
*/
VipsArgumentTable *argument_table;
/* A sorted (by priority) list of the VipsArgumentClass for this class
* and any superclasses. This is small and specific to this class.
*
* Use the stored GType to work out when to restart the list for a
* subclass.
*/
GSList *argument_table_traverse;
GType argument_table_traverse_gtype;
/* This class is deprecated and therefore hidden from various UI bits.
*
* VipsOperation has a deprecated flag, use that in preference to this
* if you can.
*/
gboolean deprecated;
/* Reserved for future expansion.
*/
void (*_vips_reserved1)( void );
void (*_vips_reserved2)( void );
void (*_vips_reserved3)( void );
void (*_vips_reserved4)( void );
};
gboolean vips_value_is_null( GParamSpec *psoec, const GValue *value );
void vips_object_set_property( GObject *gobject,
guint property_id, const GValue *value, GParamSpec *pspec );
void vips_object_get_property( GObject *gobject,
guint property_id, GValue *value, GParamSpec *pspec );
void vips_object_preclose( VipsObject *object );
int vips_object_build( VipsObject *object );
void vips_object_summary_class( VipsObjectClass *klass, VipsBuf *buf );
void vips_object_summary( VipsObject *object, VipsBuf *buf );
void vips_object_dump( VipsObject *object, VipsBuf *buf );
void vips_object_print_summary_class( VipsObjectClass *klass );
void vips_object_print_summary( VipsObject *object );
void vips_object_print_dump( VipsObject *object );
void vips_object_print_name( VipsObject *object );
gboolean vips_object_sanity( VipsObject *object );
/* Don't put spaces around void here, it breaks gtk-doc.
*/
GType vips_object_get_type(void);
void vips_object_class_install_argument( VipsObjectClass *cls,
GParamSpec *pspec, VipsArgumentFlags flags,
int priority, guint offset );
int vips_object_set_argument_from_string( VipsObject *object,
const char *name, const char *value );
gboolean vips_object_argument_needsstring( VipsObject *object,
const char *name );
int vips_object_get_argument_to_string( VipsObject *object,
const char *name, const char *arg );
int vips_object_set_required( VipsObject *object, const char *value );
typedef void *(*VipsObjectSetArguments)( VipsObject *object, void *a, void *b );
VipsObject *vips_object_new( GType type,
VipsObjectSetArguments set, void *a, void *b );
int vips_object_set_valist( VipsObject *object, va_list ap );
int vips_object_set( VipsObject *object, ... )
__attribute__((sentinel));
int vips_object_set_from_string( VipsObject *object, const char *string );
VipsObject *vips_object_new_from_string( VipsObjectClass *object_class,
const char *p );
void vips_object_to_string( VipsObject *object, VipsBuf *buf );
void *vips_object_map( VipsSListMap2Fn fn, void *a, void *b );
typedef void *(*VipsTypeMapFn)( GType type, void *a );
typedef void *(*VipsTypeMap2Fn)( GType type, void *a, void *b );
typedef void *(*VipsClassMapFn)( VipsObjectClass *cls, void *a );
void *vips_type_map( GType base, VipsTypeMap2Fn fn, void *a, void *b );
void *vips_type_map_all( GType base, VipsTypeMapFn fn, void *a );
int vips_type_depth( GType type );
GType vips_type_find( const char *basename, const char *nickname );
const char *vips_nickname_find( GType type );
void *vips_class_map_all( GType type, VipsClassMapFn fn, void *a );
const VipsObjectClass *vips_class_find( const char *basename,
const char *nickname );
VipsObject **vips_object_local_array( VipsObject *parent, int n );
void vips_object_local_cb( VipsObject *vobject, GObject *gobject );
#define vips_object_local( V, G ) \
(g_signal_connect( V, "close", G_CALLBACK( vips_object_local_cb ), G ))
void vips_object_set_static( VipsObject *object, gboolean static_object );
void vips_object_print_all( void );
void vips_object_sanity_all( void );
void vips_object_rewind( VipsObject *object );
void vips_object_unref_outputs( VipsObject *object );
const char *vips_object_get_description( VipsObject *object );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_OBJECT_H*/

142
node_modules/sharp/vendor/include/vips/operation.h generated vendored Normal file
View File

@ -0,0 +1,142 @@
/* base class for all vips operations
*/
/*
Copyright (C) 1991-2005 The National Gallery
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_OPERATION_H
#define VIPS_OPERATION_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
typedef enum /*< flags >*/ {
VIPS_OPERATION_NONE = 0,
VIPS_OPERATION_SEQUENTIAL = 1,
VIPS_OPERATION_SEQUENTIAL_UNBUFFERED = 2,
VIPS_OPERATION_NOCACHE = 4,
VIPS_OPERATION_DEPRECATED = 8
} VipsOperationFlags;
#define VIPS_TYPE_OPERATION (vips_operation_get_type())
#define VIPS_OPERATION( obj ) \
(G_TYPE_CHECK_INSTANCE_CAST( (obj), \
VIPS_TYPE_OPERATION, VipsOperation ))
#define VIPS_OPERATION_CLASS( klass ) \
(G_TYPE_CHECK_CLASS_CAST( (klass), \
VIPS_TYPE_OPERATION, VipsOperationClass ))
#define VIPS_IS_OPERATION( obj ) \
(G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_OPERATION ))
#define VIPS_IS_OPERATION_CLASS( klass ) \
(G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_OPERATION ))
#define VIPS_OPERATION_GET_CLASS( obj ) \
(G_TYPE_INSTANCE_GET_CLASS( (obj), \
VIPS_TYPE_OPERATION, VipsOperationClass ))
typedef gboolean (*VipsOperationBuildFn)( VipsObject *object );
typedef struct _VipsOperation {
VipsObject parent_instance;
/* Keep the hash here.
*/
guint hash;
gboolean found_hash;
/* Pixels calculated ... handy for measuring over-calculation.
*/
int pixels;
} VipsOperation;
typedef struct _VipsOperationClass {
VipsObjectClass parent_class;
/* Print the usage message.
*/
void (*usage)( struct _VipsOperationClass *cls, VipsBuf *buf );
/* Return a set of operation flags.
*/
VipsOperationFlags (*get_flags)( VipsOperation *operation );
VipsOperationFlags flags;
/* One of our input images has signalled "invalidate". The cache uses
* VipsOperation::invalidate to drop dirty ops.
*/
void (*invalidate)( VipsOperation *operation );
} VipsOperationClass;
/* Don't put spaces around void here, it breaks gtk-doc.
*/
GType vips_operation_get_type(void);
VipsOperationFlags vips_operation_get_flags( VipsOperation *operation );
void vips_operation_class_print_usage( VipsOperationClass *operation_class );
void vips_operation_invalidate( VipsOperation *operation );
int vips_operation_call_valist( VipsOperation *operation, va_list ap );
VipsOperation *vips_operation_new( const char *name );
int vips_call_required_optional( VipsOperation **operation,
va_list required, va_list optional );
int vips_call( const char *operation_name, ... )
__attribute__((sentinel));
int vips_call_split( const char *operation_name, va_list optional, ... );
int vips_call_split_option_string( const char *operation_name,
const char *option_string, va_list optional, ... );
void vips_call_options( GOptionGroup *group, VipsOperation *operation );
int vips_call_argv( VipsOperation *operation, int argc, char **argv );
void vips_cache_drop_all( void );
VipsOperation *vips_cache_operation_lookup( VipsOperation *operation );
void vips_cache_operation_add( VipsOperation *operation );
int vips_cache_operation_buildp( VipsOperation **operation );
VipsOperation *vips_cache_operation_build( VipsOperation *operation );
void vips_cache_print( void );
void vips_cache_set_max( int max );
void vips_cache_set_max_mem( size_t max_mem );
int vips_cache_get_max( void );
int vips_cache_get_size( void );
size_t vips_cache_get_max_mem( void );
int vips_cache_get_max_files( void );
void vips_cache_set_max_files( int max_files );
void vips_cache_set_dump( gboolean dump );
void vips_cache_set_trace( gboolean trace );
/* Part of threadpool, really, but we want these in a header that gets scanned
* for our typelib.
*/
void vips_concurrency_set( int concurrency );
int vips_concurrency_get( void );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_OPERATION_H*/

199
node_modules/sharp/vendor/include/vips/private.h generated vendored Normal file
View File

@ -0,0 +1,199 @@
/* Declarations which are public-facing, but private. See internal.h for
* declarations which are only used internally by vips and which are not
* externally visible.
*
* 6/7/09
* - from vips.h
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_PRIVATE_H
#define VIPS_PRIVATE_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#define VIPS_SPARE (8)
/* Private to iofuncs: the minimum number of scanlines we add above and below
* the window as a margin for slop.
*/
#define VIPS__WINDOW_MARGIN_PIXELS (128)
/* Private to iofuncs: add at least this many bytes above and below the window.
* There's no point mapping just a few KB of a small image.
*/
#define VIPS__WINDOW_MARGIN_BYTES (1024 * 1024 * 10)
/* sizeof() a VIPS header on disc.
*/
#define VIPS_SIZEOF_HEADER (64)
/* What we track for each mmap window. Have a list of these on an openin
* VipsImage.
*/
typedef struct {
int ref_count; /* # of regions referencing us */
struct _VipsImage *im; /* VipsImage we are attached to */
int top; /* Area of image we have mapped, in pixels */
int height;
VipsPel *data; /* First pixel of line 'top' */
void *baseaddr; /* Base of window */
size_t length; /* Size of window */
} VipsWindow;
int vips_window_unref( VipsWindow *window );
void vips_window_print( VipsWindow *window );
/* Per-thread buffer state. Held in a GPrivate.
*/
typedef struct {
GHashTable *hash; /* VipsImage -> VipsBufferCache* */
GThread *thread; /* Just for sanity checking */
} VipsBufferThread;
/* Per-image buffer cache. This keeps a list of "done" VipsBuffer that this
* worker has generated. We use this to reuse results within a thread.
*
* Hash to this from VipsBufferThread::hash.
* We can't store the GSList directly in the hash table as GHashTable lacks an
* update operation and we'd need to _remove() and _insert() on every list
* operation.
*/
typedef struct _VipsBufferCache {
GSList *buffers; /* GSList of "done" VipsBuffer* */
GThread *thread; /* Just for sanity checking */
struct _VipsImage *im;
VipsBufferThread *buffer_thread;
GSList *reserve; /* VipsBuffer kept in reserve */
int n_reserve; /* Number in reserve */
} VipsBufferCache;
/* What we track for each pixel buffer. These can move between caches and
* between threads, but not between images.
*
* Moving between threads is difficult, use region ownership stuff.
*/
typedef struct _VipsBuffer {
int ref_count; /* # of regions referencing us */
struct _VipsImage *im; /* VipsImage we are attached to */
VipsRect area; /* Area this pixel buffer covers */
gboolean done; /* Calculated and in a cache */
VipsBufferCache *cache; /* The cache this buffer is published on */
VipsPel *buf; /* Private malloc() area */
size_t bsize; /* Size of private malloc() */
} VipsBuffer;
void vips_buffer_dump_all( void );
void vips_buffer_done( VipsBuffer *buffer );
void vips_buffer_undone( VipsBuffer *buffer );
void vips_buffer_unref( VipsBuffer *buffer );
VipsBuffer *vips_buffer_new( struct _VipsImage *im, VipsRect *area );
VipsBuffer *vips_buffer_ref( struct _VipsImage *im, VipsRect *area );
VipsBuffer *vips_buffer_unref_ref( VipsBuffer *buffer,
struct _VipsImage *im, VipsRect *area );
void vips_buffer_print( VipsBuffer *buffer );
void vips__render_shutdown( void );
/* Sections of region.h that are private to VIPS.
*/
/* Region types.
*/
typedef enum _RegionType {
VIPS_REGION_NONE,
VIPS_REGION_BUFFER, /* A VipsBuffer */
VIPS_REGION_OTHER_REGION, /* Memory on another region */
VIPS_REGION_OTHER_IMAGE, /* Memory on another image */
VIPS_REGION_WINDOW /* A VipsWindow on fd */
} RegionType;
/* Private to iofuncs: the size of the `tiles' requested by
* vips_image_generate() when acting as a data sink.
*/
#define VIPS__TILE_WIDTH (128)
#define VIPS__TILE_HEIGHT (128)
/* The height of the strips for the other two request styles.
*/
#define VIPS__THINSTRIP_HEIGHT (1)
#define VIPS__FATSTRIP_HEIGHT (16)
/* Functions on regions.
*/
struct _VipsRegion;
void vips__region_take_ownership( struct _VipsRegion *reg );
void vips__region_check_ownership( struct _VipsRegion *reg );
void vips__region_no_ownership( struct _VipsRegion *reg );
typedef int (*VipsRegionFillFn)( struct _VipsRegion *, void * );
int vips_region_fill( struct _VipsRegion *reg,
const VipsRect *r, VipsRegionFillFn fn, void *a );
int vips__image_wio_output( struct _VipsImage *image );
int vips__image_pio_output( struct _VipsImage *image );
VipsArgumentInstance *vips__argument_get_instance(
VipsArgumentClass *argument_class,
VipsObject *object);
VipsArgument *vips__argument_table_lookup( VipsArgumentTable *table,
GParamSpec *pspec);
void vips__demand_hint_array( struct _VipsImage *image,
int hint, struct _VipsImage **in );
int vips__image_copy_fields_array( struct _VipsImage *out,
struct _VipsImage *in[] );
void vips__region_count_pixels( struct _VipsRegion *region, const char *nickname );
void vips_region_dump_all( void );
/* Deprecated.
*/
int vips__init( const char *argv0 );
size_t vips__get_sizeof_vipsobject( void );
int vips_region_prepare_many( struct _VipsRegion **reg, const VipsRect *r );
/* Handy for debugging.
*/
int vips__view_image( struct _VipsImage *image );
/* Pre 8.7 libvipses used this for allocating argument ids.
*/
extern int _vips__argument_id;
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_PRIVATE_H*/

67
node_modules/sharp/vendor/include/vips/rect.h generated vendored Normal file
View File

@ -0,0 +1,67 @@
/* Simple rectangle algebra.
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_RECT_H
#define VIPS_RECT_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
typedef struct _VipsRect {
/*< public >*/
int left;
int top;
int width;
int height;
} VipsRect;
#define VIPS_RECT_RIGHT(R) ((R)->left + (R)->width)
#define VIPS_RECT_BOTTOM(R) ((R)->top + (R)->height)
#define VIPS_RECT_HCENTRE(R) ((R)->left + (R)->width / 2)
#define VIPS_RECT_VCENTRE(R) ((R)->top + (R)->height / 2)
gboolean vips_rect_isempty( const VipsRect *r );
gboolean vips_rect_includespoint( const VipsRect *r, int x, int y );
gboolean vips_rect_includesrect( const VipsRect *r1, const VipsRect *r2 );
gboolean vips_rect_equalsrect( const VipsRect *r1, const VipsRect *r2 );
void vips_rect_marginadjust( VipsRect *r, int n );
void vips_rect_intersectrect( const VipsRect *r1, const VipsRect *r2,
VipsRect *out );
void vips_rect_unionrect( const VipsRect *r1, const VipsRect *r2,
VipsRect *out );
VipsRect *vips_rect_dup( const VipsRect *r );
void vips_rect_normalise( VipsRect *r );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_RECT_H*/

201
node_modules/sharp/vendor/include/vips/region.h generated vendored Normal file
View File

@ -0,0 +1,201 @@
/* Definitions for partial image regions.
*
* J.Cupitt, 8/4/93
*
* 2/3/11
* - move to GObject
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_REGION_H
#define VIPS_REGION_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#define VIPS_TYPE_REGION (vips_region_get_type())
#define VIPS_REGION( obj ) \
(G_TYPE_CHECK_INSTANCE_CAST( (obj), \
VIPS_TYPE_REGION, VipsRegion ))
#define VIPS_REGION_CLASS( klass ) \
(G_TYPE_CHECK_CLASS_CAST( (klass), \
VIPS_TYPE_REGION, VipsRegionClass))
#define VIPS_IS_REGION( obj ) \
(G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_REGION ))
#define VIPS_IS_REGION_CLASS( klass ) \
(G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_REGION ))
#define VIPS_REGION_GET_CLASS( obj ) \
(G_TYPE_INSTANCE_GET_CLASS( (obj), \
VIPS_TYPE_REGION, VipsRegionClass ))
/**
* VipsRegionShrink:
* @VIPS_REGION_SHRINK_MEAN: use the average
* @VIPS_REGION_SHRINK_MEDIAN: use the median
* @VIPS_REGION_SHRINK_MODE: use the mode
*
* How to calculate the output pixels when shrinking a 2x2 region.
*/
typedef enum {
VIPS_REGION_SHRINK_MEAN,
VIPS_REGION_SHRINK_MEDIAN,
VIPS_REGION_SHRINK_MODE,
VIPS_REGION_SHRINK_LAST
} VipsRegionShrink;
/* Sub-area of image.
*/
typedef struct _VipsRegion {
VipsObject parent_object;
/*< public >*/
/* Users may read these two fields.
*/
VipsImage *im; /* Link back to parent image */
VipsRect valid; /* Area of parent we can see */
/* The rest of VipsRegion is private.
*/
/*< private >*/
RegionType type; /* What kind of attachment */
VipsPel *data; /* Off here to get data */
int bpl; /* Bytes-per-line for data */
void *seq; /* Sequence we are using to fill region */
/* The thread that made this region. Used to assert() test that
* regions are not being shared between threads.
*/
GThread *thread;
/* Ref to the window we use for this region, if any.
*/
VipsWindow *window;
/* Ref to the buffer we use for this region, if any.
*/
VipsBuffer *buffer;
/* The image this region is on has changed and caches need to be
* dropped.
*/
gboolean invalid;
} VipsRegion;
typedef struct _VipsRegionClass {
VipsObjectClass parent_class;
} VipsRegionClass;
/* Don't put spaces around void here, it breaks gtk-doc.
*/
GType vips_region_get_type(void);
VipsRegion *vips_region_new( VipsImage *image );
int vips_region_buffer( VipsRegion *reg, const VipsRect *r );
int vips_region_image( VipsRegion *reg, const VipsRect *r );
int vips_region_region( VipsRegion *reg, VipsRegion *dest,
const VipsRect *r, int x, int y );
int vips_region_equalsregion( VipsRegion *reg1, VipsRegion *reg2 );
int vips_region_position( VipsRegion *reg, int x, int y );
void vips_region_paint( VipsRegion *reg, const VipsRect *r, int value );
void vips_region_paint_pel( VipsRegion *reg,
const VipsRect *r, const VipsPel *ink );
void vips_region_black( VipsRegion *reg );
void vips_region_copy( VipsRegion *reg, VipsRegion *dest,
const VipsRect *r, int x, int y );
int vips_region_shrink_method( VipsRegion *from, VipsRegion *to,
const VipsRect *target, VipsRegionShrink method );
int vips_region_shrink( VipsRegion *from, VipsRegion *to,
const VipsRect *target );
int vips_region_prepare( VipsRegion *reg, const VipsRect *r );
int vips_region_prepare_to( VipsRegion *reg,
VipsRegion *dest, const VipsRect *r, int x, int y );
void vips_region_invalidate( VipsRegion *reg );
/* Use this to count pixels passing through key points. Handy for spotting bad
* overcomputation.
*/
#ifdef DEBUG_LEAK
#define VIPS_COUNT_PIXELS( R, N ) vips__region_count_pixels( R, N )
#else /*!DEBUG_LEAK*/
#define VIPS_COUNT_PIXELS( R, N )
#endif /*DEBUG_LEAK*/
/* Macros on VipsRegion.
* VIPS_REGION_LSKIP() add to move down line
* VIPS_REGION_N_ELEMENTS() number of elements across region
* VIPS_REGION_SIZEOF_LINE() sizeof width of region
* VIPS_REGION_ADDR() address of pixel in region
*/
#define VIPS_REGION_LSKIP( R ) \
((size_t)((R)->bpl))
#define VIPS_REGION_N_ELEMENTS( R ) \
((size_t)((R)->valid.width * (R)->im->Bands))
#define VIPS_REGION_SIZEOF_LINE( R ) \
((size_t)((R)->valid.width * VIPS_IMAGE_SIZEOF_PEL( (R)->im) ))
/* If DEBUG is defined, add bounds checking.
*/
#ifdef DEBUG
#define VIPS_REGION_ADDR( R, X, Y ) \
( (vips_rect_includespoint( &(R)->valid, (X), (Y) ))? \
((R)->data + ((Y) - (R)->valid.top) * VIPS_REGION_LSKIP(R) + \
((X) - (R)->valid.left) * VIPS_IMAGE_SIZEOF_PEL((R)->im)): \
(fprintf( stderr, \
"VIPS_REGION_ADDR: point out of bounds, " \
"file \"%s\", line %d\n" \
"(point x=%d, y=%d\n" \
" should have been within VipsRect left=%d, top=%d, " \
"width=%d, height=%d)\n", \
__FILE__, __LINE__, \
(X), (Y), \
(R)->valid.left, \
(R)->valid.top, \
(R)->valid.width, \
(R)->valid.height ), abort(), (VipsPel *) NULL) \
)
#else /*DEBUG*/
#define VIPS_REGION_ADDR( R, X, Y ) \
((R)->data + \
((Y)-(R)->valid.top) * VIPS_REGION_LSKIP( R ) + \
((X)-(R)->valid.left) * VIPS_IMAGE_SIZEOF_PEL( (R)->im ))
#endif /*DEBUG*/
#define VIPS_REGION_ADDR_TOPLEFT( R ) ((R)->data)
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_REGION_H*/

104
node_modules/sharp/vendor/include/vips/resample.h generated vendored Normal file
View File

@ -0,0 +1,104 @@
/* resample.h
*
* 20/9/09
* - from proto.h
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_RESAMPLE_H
#define VIPS_RESAMPLE_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
typedef enum {
VIPS_KERNEL_NEAREST,
VIPS_KERNEL_LINEAR,
VIPS_KERNEL_CUBIC,
VIPS_KERNEL_MITCHELL,
VIPS_KERNEL_LANCZOS2,
VIPS_KERNEL_LANCZOS3,
VIPS_KERNEL_LAST
} VipsKernel;
typedef enum {
VIPS_SIZE_BOTH,
VIPS_SIZE_UP,
VIPS_SIZE_DOWN,
VIPS_SIZE_FORCE,
VIPS_SIZE_LAST
} VipsSize;
int vips_shrink( VipsImage *in, VipsImage **out,
double hshrink, double vshrink, ... )
__attribute__((sentinel));
int vips_shrinkh( VipsImage *in, VipsImage **out, int hshrink, ... )
__attribute__((sentinel));
int vips_shrinkv( VipsImage *in, VipsImage **out, int vshrink, ... )
__attribute__((sentinel));
int vips_reduce( VipsImage *in, VipsImage **out,
double hshrink, double vshrink, ... )
__attribute__((sentinel));
int vips_reduceh( VipsImage *in, VipsImage **out, double hshrink, ... )
__attribute__((sentinel));
int vips_reducev( VipsImage *in, VipsImage **out, double vshrink, ... )
__attribute__((sentinel));
int vips_thumbnail( const char *filename, VipsImage **out, int width, ... )
__attribute__((sentinel));
int vips_thumbnail_buffer( void *buf, size_t len, VipsImage **out,
int width, ... )
__attribute__((sentinel));
int vips_thumbnail_image( VipsImage *in, VipsImage **out, int width, ... )
__attribute__((sentinel));
int vips_similarity( VipsImage *in, VipsImage **out, ... )
__attribute__((sentinel));
int vips_rotate( VipsImage *in, VipsImage **out, double angle, ... )
__attribute__((sentinel));
int vips_affine( VipsImage *in, VipsImage **out,
double a, double b, double c, double d, ... )
__attribute__((sentinel));
int vips_resize( VipsImage *in, VipsImage **out, double scale, ... )
__attribute__((sentinel));
int vips_mapim( VipsImage *in, VipsImage **out, VipsImage *index, ... )
__attribute__((sentinel));
int vips_quadratic( VipsImage *in, VipsImage **out, VipsImage *coeff, ... )
__attribute__((sentinel));
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_RESAMPLE_H*/

68
node_modules/sharp/vendor/include/vips/semaphore.h generated vendored Normal file
View File

@ -0,0 +1,68 @@
/* Definitions for thread support.
*
* JC, 9/5/94
* 30/7/99 RP, JC
* - reworked for posix/solaris threads
* 28/9/99 JC
* - restructured, made part of public API
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_SEMAPHORE_H
#define VIPS_SEMAPHORE_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#include <vips/vips.h>
#include <vips/thread.h>
/* Implement our own semaphores.
*/
typedef struct {
char *name;
int v;
GMutex *mutex;
GCond *cond;
} VipsSemaphore;
int vips_semaphore_up( VipsSemaphore *s );
int vips_semaphore_down( VipsSemaphore *s );
int vips_semaphore_upn( VipsSemaphore *s, int n );
int vips_semaphore_downn( VipsSemaphore *s, int n );
void vips_semaphore_destroy( VipsSemaphore *s );
void vips_semaphore_init( VipsSemaphore *s, int v, char *name );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_SEMAPHORE_H*/

2
node_modules/sharp/vendor/include/vips/soname.h generated vendored Normal file
View File

@ -0,0 +1,2 @@
/* This file is autogenerated, do not edit. */
#define VIPS_SONAME "libvips.42.dylib"

61
node_modules/sharp/vendor/include/vips/thread.h generated vendored Normal file
View File

@ -0,0 +1,61 @@
/* Private include file ... if we've been configured without gthread, we need
* to point the g_thread_*() and g_mutex_*() functions at our own stubs.
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_THREAD_H
#define VIPS_THREAD_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
/* We need wrappers over g_mutex_new(), it was replaced by g_mutex_init() in
* glib 2.32+
*/
GMutex *vips_g_mutex_new( void );
void vips_g_mutex_free( GMutex * );
/* Same for GCond.
*/
GCond *vips_g_cond_new( void );
void vips_g_cond_free( GCond * );
/* ... and for GThread.
*/
GThread *vips_g_thread_new( const char *, GThreadFunc, gpointer );
void *vips_g_thread_join( GThread *thread );
gboolean vips_thread_isworker( void );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_THREAD_H*/

146
node_modules/sharp/vendor/include/vips/threadpool.h generated vendored Normal file
View File

@ -0,0 +1,146 @@
/* Thread eval for VIPS.
*
* 29/9/99 JC
* - from thread.h
* 17/3/10
* - from threadgroup
* - rework with a simpler distributed work allocation model
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_THREADPOOL_H
#define VIPS_THREADPOOL_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#include <vips/semaphore.h>
/* Per-thread state. Allocate functions can use these members to
* communicate with work functions.
*/
#define VIPS_TYPE_THREAD_STATE (vips_thread_state_get_type())
#define VIPS_THREAD_STATE( obj ) \
(G_TYPE_CHECK_INSTANCE_CAST( (obj), \
VIPS_TYPE_THREAD_STATE, VipsThreadState ))
#define VIPS_THREAD_STATE_CLASS( klass ) \
(G_TYPE_CHECK_CLASS_CAST( (klass), \
VIPS_TYPE_THREAD_STATE, VipsThreadStateClass))
#define VIPS_IS_THREAD_STATE( obj ) \
(G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_THREAD_STATE ))
#define VIPS_IS_THREAD_STATE_CLASS( klass ) \
(G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_THREAD_STATE ))
#define VIPS_THREAD_STATE_GET_CLASS( obj ) \
(G_TYPE_INSTANCE_GET_CLASS( (obj), \
VIPS_TYPE_THREAD_STATE, VipsThreadStateClass ))
typedef struct _VipsThreadState {
VipsObject parent_object;
/*< public >*/
/* Image we run on.
*/
VipsImage *im;
/* This region is created and destroyed by the threadpool for the
* use of the worker.
*/
VipsRegion *reg;
/* Neither used nor set, do what you like with them.
*/
VipsRect pos;
int x, y;
/* Set in work to get the allocate to signal stop.
*/
gboolean stop;
/* The client data passed to the enclosing vips_threadpool_run().
*/
void *a;
/* Set in allocate to stall this thread for a moment. Handy for
* debugging race conditions.
*/
gboolean stall;
} VipsThreadState;
typedef struct _VipsThreadStateClass {
VipsObjectClass parent_class;
/*< public >*/
} VipsThreadStateClass;
void *vips_thread_state_set( VipsObject *object, void *a, void *b );
/* Don't put spaces around void here, it breaks gtk-doc.
*/
GType vips_thread_state_get_type(void);
VipsThreadState *vips_thread_state_new( VipsImage *im, void *a );
/* Constructor for per-thread state.
*/
typedef VipsThreadState *(*VipsThreadStartFn)( VipsImage *im, void *a );
/* A work allocate function. This is run single-threaded by a worker to
* set up a new work unit.
* Return non-zero for errors. Set *stop for "no more work to do"
*/
typedef int (*VipsThreadpoolAllocateFn)( VipsThreadState *state,
void *a, gboolean *stop );
/* A work function. This does a unit of work (eg. processing a tile or
* whatever). Return non-zero for errors.
*/
typedef int (*VipsThreadpoolWorkFn)( VipsThreadState *state, void *a );
/* A progress function. This is run by the main thread once for every
* allocation. Return an error to kill computation early.
*/
typedef int (*VipsThreadpoolProgressFn)( void *a );
int vips_threadpool_run( VipsImage *im,
VipsThreadStartFn start,
VipsThreadpoolAllocateFn allocate,
VipsThreadpoolWorkFn work,
VipsThreadpoolProgressFn progress,
void *a );
void vips_get_tile_size( VipsImage *im,
int *tile_width, int *tile_height, int *n_lines );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_THREADPOOL_H*/

85
node_modules/sharp/vendor/include/vips/transform.h generated vendored Normal file
View File

@ -0,0 +1,85 @@
/* Affine transforms.
*/
/*
Copyright (C) 1991-2003 The National Gallery
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_TRANSFORM_H
#define VIPS_TRANSFORM_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
/* Params for an affine transformation.
*/
typedef struct {
/* Area of input we can use. This can be smaller than the real input
* image: we expand the input to add extra pixels for interpolation.
*/
VipsRect iarea;
/* The area of the output we've been asked to generate. left/top can
* be negative.
*/
VipsRect oarea;
/* The transform.
*/
double a, b, c, d;
double idx, idy;
double odx, ody;
double ia, ib, ic, id; /* Inverse of matrix abcd */
} VipsTransformation;
void vips__transform_init( VipsTransformation *trn );
int vips__transform_calc_inverse( VipsTransformation *trn );
int vips__transform_isidentity( const VipsTransformation *trn );
int vips__transform_add( const VipsTransformation *in1,
const VipsTransformation *in2,
VipsTransformation *out );
void vips__transform_print( const VipsTransformation *trn );
void vips__transform_forward_point( const VipsTransformation *trn,
const double x, const double y, double *ox, double *oy );
void vips__transform_invert_point( const VipsTransformation *trn,
const double x, const double y, double *ox, double *oy );
void vips__transform_forward_rect( const VipsTransformation *trn,
const VipsRect *in, VipsRect *out );
void vips__transform_invert_rect( const VipsTransformation *trn,
const VipsRect *in, VipsRect *out );
void vips__transform_set_area( VipsTransformation * );
int vips__affine( VipsImage *in, VipsImage *out, VipsTransformation *trn );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_TRANSFORM_H*/

253
node_modules/sharp/vendor/include/vips/type.h generated vendored Normal file
View File

@ -0,0 +1,253 @@
/* the GTypes we define
*
* 27/10/11
* - from header.h
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_TYPE_H
#define VIPS_TYPE_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
/* A very simple boxed type for testing. Just holds an int.
*/
typedef struct _VipsThing {
int i;
} VipsThing;
/**
* VIPS_TYPE_THING:
*
* The #GType for a #VipsThing.
*/
#define VIPS_TYPE_THING (vips_thing_get_type())
GType vips_thing_get_type(void);
VipsThing *vips_thing_new( int i );
/* A ref-counted area of memory. Can hold arrays of things as well.
*/
typedef struct _VipsArea {
void *data;
size_t length; /* 0 if not known */
/* If this area represents an array, the number of elements in the
* array. Equal to length / sizeof(element).
*/
int n;
/*< private >*/
/* Reference count and lock.
*
* We could use an atomic int, but this is not a high-traffic data
* structure, so a simple GMutex is OK.
*/
int count;
GMutex *lock;
/* Things like ICC profiles need their own free functions.
*/
VipsCallbackFn free_fn;
/* If we are holding an array (for example, an array of double), the
* GType of the elements and their size. 0 for not known.
*
* n is always length / sizeof_type, we keep it as a member for
* convenience.
*/
GType type;
size_t sizeof_type;
} VipsArea;
VipsArea *vips_area_copy( VipsArea *area );
void vips_area_unref( VipsArea *area );
VipsArea *vips_area_new( VipsCallbackFn free_fn, void *data );
VipsArea *vips_area_new_array( GType type, size_t sizeof_type, int n );
VipsArea *vips_area_new_array_object( int n );
void *vips_area_get_data( VipsArea *area,
size_t *length, int *n, GType *type, size_t *sizeof_type );
#ifdef VIPS_DEBUG
#define VIPS_ARRAY_ADDR( X, I ) \
(((I) >= 0 && (I) < VIPS_AREA( X )->n) ? \
(void *) ((VipsPel *) VIPS_AREA( X )->data + \
VIPS_AREA( X )->sizeof_type * (I)) : \
(fprintf( stderr, \
"VIPS_ARRAY_ADDR: index out of bounds, " \
"file \"%s\", line %d\n" \
"(index %d should have been within [0,%d])\n", \
__FILE__, __LINE__, \
(I), VIPS_AREA( X )->n ), NULL ))
#else /*!VIPS_DEBUG*/
#define VIPS_ARRAY_ADDR( X, I ) \
((void *) \
((VipsPel *) VIPS_AREA( X )->data + VIPS_AREA( X )->sizeof_type * (I)))
#endif /*VIPS_DEBUG*/
/**
* VIPS_TYPE_AREA:
*
* The #GType for a #VipsArea.
*/
#define VIPS_TYPE_AREA (vips_area_get_type())
#define VIPS_AREA( X ) ((VipsArea *) (X))
GType vips_area_get_type(void);
/**
* VIPS_TYPE_SAVE_STRING:
*
* The #GType for a #VipsSaveString.
*/
#define VIPS_TYPE_SAVE_STRING (vips_save_string_get_type())
GType vips_save_string_get_type(void);
/**
* VIPS_TYPE_REF_STRING:
*
* The #GType for a #VipsRefString.
*/
#define VIPS_TYPE_REF_STRING (vips_ref_string_get_type())
typedef struct _VipsRefString {
VipsArea area;
} VipsRefString;
VipsRefString *vips_ref_string_new( const char *str );
const char *vips_ref_string_get( VipsRefString *refstr, size_t *length );
GType vips_ref_string_get_type(void);
/**
* VIPS_TYPE_BLOB:
*
* The %GType for a #VipsBlob.
*/
#define VIPS_TYPE_BLOB (vips_blob_get_type())
typedef struct _VipsBlob {
VipsArea area;
} VipsBlob;
VipsBlob *vips_blob_new( VipsCallbackFn free_fn,
const void *data, size_t size );
VipsBlob *vips_blob_copy( const void *data, size_t size );
const void *vips_blob_get( VipsBlob *blob, size_t *size );
GType vips_blob_get_type(void);
/**
* VIPS_TYPE_ARRAY_DOUBLE:
*
* The #GType for a #VipsArrayDouble.
*/
#define VIPS_TYPE_ARRAY_DOUBLE (vips_array_double_get_type())
typedef struct _VipsArrayDouble {
VipsArea area;
} VipsArrayDouble;
VipsArrayDouble *vips_array_double_new( const double *array, int n );
VipsArrayDouble *vips_array_double_newv( int n, ... );
double *vips_array_double_get( VipsArrayDouble *array, int *n );
GType vips_array_double_get_type(void);
/**
* VIPS_TYPE_ARRAY_INT:
*
* The #GType for a #VipsArrayInt.
*/
#define VIPS_TYPE_ARRAY_INT (vips_array_int_get_type())
typedef struct _VipsArrayInt {
VipsArea area;
} VipsArrayInt;
VipsArrayInt *vips_array_int_new( const int *array, int n );
VipsArrayInt *vips_array_int_newv( int n, ... );
int *vips_array_int_get( VipsArrayInt *array, int *n );
GType vips_array_int_get_type(void);
/**
* VIPS_TYPE_ARRAY_IMAGE:
*
* The #GType for a #VipsArrayImage.
*/
#define VIPS_TYPE_ARRAY_IMAGE (vips_array_image_get_type())
typedef struct _VipsArrayImage {
VipsArea area;
} VipsArrayImage;
/* See image.h for vips_array_image_new() etc., they need to be declared after
* VipsImage.
*/
GType vips_array_image_get_type(void);
void vips_value_set_area( GValue *value, VipsCallbackFn free_fn, void *data );
void *vips_value_get_area( const GValue *value, size_t *length );
const char *vips_value_get_save_string( const GValue *value );
void vips_value_set_save_string( GValue *value, const char *str );
void vips_value_set_save_stringf( GValue *value, const char *fmt, ... )
__attribute__((format(printf, 2, 3)));
const char *vips_value_get_ref_string( const GValue *value, size_t *length );
void vips_value_set_ref_string( GValue *value, const char *str );
void *vips_value_get_blob( const GValue *value, size_t *length );
void vips_value_set_blob( GValue *value,
VipsCallbackFn free_fn, void *data, size_t length );
void vips_value_set_blob_free( GValue *value, void *data, size_t length );
void vips_value_set_array( GValue *value,
int n, GType type, size_t sizeof_type );
void *vips_value_get_array( const GValue *value,
int *n, GType *type, size_t *sizeof_type );
double *vips_value_get_array_double( const GValue *value, int *n );
void vips_value_set_array_double( GValue *value, const double *array, int n );
int *vips_value_get_array_int( const GValue *value, int *n );
void vips_value_set_array_int( GValue *value, const int *array, int n );
GObject **vips_value_get_array_object( const GValue *value, int *n );
void vips_value_set_array_object( GValue *value, int n );
/* See also image.h, that has vips_array_image_get(), vips_array_image_new(),
* vips_value_get_array_image() and vips_value_set_array_image(). They need
* to be declared after VipsImage.
*/
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_TYPE_H*/

350
node_modules/sharp/vendor/include/vips/util.h generated vendored Normal file
View File

@ -0,0 +1,350 @@
/* Various useful definitions.
*
* J.Cupitt, 8/4/93
* 15/7/96 JC
* - C++ stuff added
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_UTIL_H
#define VIPS_UTIL_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#include <stdio.h>
#include <math.h>
/* Some platforms don't have M_PI :-(
*/
#define VIPS_PI (3.14159265358979323846)
/* Convert degrees->rads and vice-versa.
*/
#define VIPS_RAD( R ) (((R) / 360.0) * 2.0 * VIPS_PI)
#define VIPS_DEG( A ) (((A) / (2.0 * VIPS_PI)) * 360.0)
#define VIPS_MAX( A, B ) ((A) > (B) ? (A) : (B))
#define VIPS_MIN( A, B ) ((A) < (B) ? (A) : (B))
#define VIPS_CLIP( A, V, B ) VIPS_MAX( (A), VIPS_MIN( (B), (V) ) )
#define VIPS_FCLIP( A, V, B ) VIPS_FMAX( (A), VIPS_FMIN( (B), (V) ) )
#define VIPS_NUMBER( R ) ((int) (sizeof(R) / sizeof(R[0])))
#define VIPS_ABS( X ) (((X) >= 0) ? (X) : -(X))
/* The built-in isnan and isinf functions provided by gcc 4+ and clang are
* up to 7x faster than their libc equivalent included from <math.h>.
*/
#if defined(__clang__) || (__GNUC__ >= 4)
#define VIPS_ISNAN( V ) __builtin_isnan( V )
#define VIPS_ISINF( V ) __builtin_isinf( V )
#define VIPS_FLOOR( V ) __builtin_floor( V )
#define VIPS_CEIL( V ) __builtin_ceil( V )
#define VIPS_RINT( V ) __builtin_rint( V )
#define VIPS_ROUND( V ) __builtin_round( V )
#define VIPS_FABS( V ) __builtin_fabs( V )
#define VIPS_FMAX( A, B ) __builtin_fmax( A, B )
#define VIPS_FMIN( A, B ) __builtin_fmin( A, B )
#else
#define VIPS_ISNAN( V ) isnan( V )
#define VIPS_ISINF( V ) isinf( V )
#define VIPS_FLOOR( V ) floor( V )
#define VIPS_CEIL( V ) ceil( V )
#define VIPS_RINT( V ) rint( V )
#define VIPS_ROUND( V ) round( V )
#define VIPS_FABS( V ) VIPS_ABS( V )
#define VIPS_FMAX( A, B ) VIPS_MAX( A, B )
#define VIPS_FMIN( A, B ) VIPS_MIN( A, B )
#endif
/* Testing status before the function call saves a lot of time.
*/
#define VIPS_ONCE( ONCE, FUNC, CLIENT ) \
G_STMT_START { \
if( G_UNLIKELY( (ONCE)->status != G_ONCE_STATUS_READY ) ) \
(void) g_once( ONCE, FUNC, CLIENT ); \
} G_STMT_END
/* VIPS_RINT() does "bankers rounding", it rounds to the nerarest even integer.
* For things like image geometry, we want strict nearest int.
*
* If you know it's unsigned, _UINT is a little faster.
*/
#define VIPS_ROUND_INT( R ) ((int) ((R) > 0 ? ((R) + 0.5) : ((R) - 0.5)))
#define VIPS_ROUND_UINT( R ) ((int) ((R) + 0.5))
/* Round N down and up to the nearest multiple of P.
*/
#define VIPS_ROUND_DOWN( N, P ) ((N) - ((N) % (P)))
#define VIPS_ROUND_UP( N, P ) (VIPS_ROUND_DOWN( (N) + (P) - 1, (P) ))
#define VIPS_SWAP( TYPE, A, B ) \
G_STMT_START { \
TYPE t = (A); \
(A) = (B); \
(B) = t; \
} G_STMT_END
/* Duff's device. Do OPERation N times in a 16-way unrolled loop.
*/
#define VIPS_UNROLL( N, OPER ) \
G_STMT_START { \
if( (N) ) { \
int duff_count = ((N) + 15) / 16; \
\
switch( (N) % 16 ) { \
case 0: do { OPER; \
case 15: OPER; \
case 14: OPER; \
case 13: OPER; \
case 12: OPER; \
case 11: OPER; \
case 10: OPER; \
case 9: OPER; \
case 8: OPER; \
case 7: OPER; \
case 6: OPER; \
case 5: OPER; \
case 4: OPER; \
case 3: OPER; \
case 2: OPER; \
case 1: OPER; \
} while( --duff_count > 0 ); \
} \
} \
} G_STMT_END
/* The g_info() macro was added in 2.40.
*/
#ifndef g_info
/* Hopefully we have varargs macros. Maybe revisit this.
*/
#define g_info(...) \
g_log( G_LOG_DOMAIN, G_LOG_LEVEL_INFO, __VA_ARGS__ )
#endif
/* Various integer range clips. Record over/under flows.
*/
#define VIPS_CLIP_UCHAR( V, SEQ ) \
G_STMT_START { \
if( (V) < 0 ) { \
(SEQ)->underflow++; \
(V) = 0; \
} \
else if( (V) > UCHAR_MAX ) { \
(SEQ)->overflow++; \
(V) = UCHAR_MAX; \
} \
} G_STMT_END
#define VIPS_CLIP_CHAR( V, SEQ ) \
G_STMT_START { \
if( (V) < SCHAR_MIN ) { \
(SEQ)->underflow++; \
(V) = SCHAR_MIN; \
} \
else if( (V) > SCHAR_MAX ) { \
(SEQ)->overflow++; \
(V) = SCHAR_MAX; \
} \
} G_STMT_END
#define VIPS_CLIP_USHORT( V, SEQ ) \
G_STMT_START { \
if( (V) < 0 ) { \
(SEQ)->underflow++; \
(V) = 0; \
} \
else if( (V) > USHRT_MAX ) { \
(SEQ)->overflow++; \
(V) = USHRT_MAX; \
} \
} G_STMT_END
#define VIPS_CLIP_SHORT( V, SEQ ) \
G_STMT_START { \
if( (V) < SHRT_MIN ) { \
(SEQ)->underflow++; \
(V) = SHRT_MIN; \
} \
else if( (V) > SHRT_MAX ) { \
(SEQ)->overflow++; \
(V) = SHRT_MAX; \
} \
} G_STMT_END
#define VIPS_CLIP_UINT( V, SEQ ) \
G_STMT_START { \
if( (V) < 0 ) { \
(SEQ)->underflow++; \
(V) = 0; \
} \
} G_STMT_END
#define VIPS_CLIP_NONE( V, SEQ ) {}
/* Not all platforms have PATH_MAX (eg. Hurd) and we don't need a platform one
* anyway, just a static buffer big enough for almost any path.
*/
#define VIPS_PATH_MAX (4096)
const char *vips_enum_string( GType enm, int value );
const char *vips_enum_nick( GType enm, int value );
int vips_enum_from_nick( const char *domain, GType type, const char *str );
int vips_flags_from_nick( const char *domain, GType type, const char *nick );
gboolean vips_slist_equal( GSList *l1, GSList *l2 );
void *vips_slist_map2( GSList *list, VipsSListMap2Fn fn, void *a, void *b );
void *vips_slist_map2_rev( GSList *list, VipsSListMap2Fn fn, void *a, void *b );
void *vips_slist_map4( GSList *list,
VipsSListMap4Fn fn, void *a, void *b, void *c, void *d );
void *vips_slist_fold2( GSList *list, void *start,
VipsSListFold2Fn fn, void *a, void *b );
GSList *vips_slist_filter( GSList *list, VipsSListMap2Fn fn, void *a, void *b );
void vips_slist_free_all( GSList *list );
void *vips_map_equal( void *a, void *b );
void *vips_hash_table_map( GHashTable *hash,
VipsSListMap2Fn fn, void *a, void *b );
char *vips_strncpy( char *dest, const char *src, int n );
char *vips_strrstr( const char *haystack, const char *needle );
gboolean vips_ispostfix( const char *a, const char *b );
gboolean vips_iscasepostfix( const char *a, const char *b );
gboolean vips_isprefix( const char *a, const char *b );
char *vips_break_token( char *str, const char *brk );
void vips__chomp( char *str );
int vips_vsnprintf( char *str, size_t size, const char *format, va_list ap );
int vips_snprintf( char *str, size_t size, const char *format, ... )
__attribute__((format(printf, 3, 4)));
int vips_filename_suffix_match( const char *path, const char *suffixes[] );
gint64 vips_file_length( int fd );
int vips__write( int fd, const void *buf, size_t count );
int vips__open( const char *filename, int flags, ... );
int vips__open_read( const char *filename );
FILE *vips__fopen( const char *filename, const char *mode );
FILE *vips__file_open_read( const char *filename,
const char *fallback_dir, gboolean text_mode );
FILE *vips__file_open_write( const char *filename,
gboolean text_mode );
char *vips__file_read( FILE *fp, const char *name, size_t *length_out );
char *vips__file_read_name( const char *name, const char *fallback_dir,
size_t *length_out );
int vips__file_write( void *data, size_t size, size_t nmemb, FILE *stream );
guint64 vips__get_bytes( const char *filename,
unsigned char buf[], guint64 len );
int vips__fgetc( FILE *fp );
GValue *vips__gvalue_ref_string_new( const char *text );
void vips__gslist_gvalue_free( GSList *list );
GSList *vips__gslist_gvalue_copy( const GSList *list );
GSList *vips__gslist_gvalue_merge( GSList *a, const GSList *b );
char *vips__gslist_gvalue_get( const GSList *list );
int vips__seek( int fd, gint64 pos );
int vips__ftruncate( int fd, gint64 pos );
int vips_existsf( const char *name, ... )
__attribute__((format(printf, 1, 2)));
int vips_mkdirf( const char *name, ... )
__attribute__((format(printf, 1, 2)));
int vips_rmdirf( const char *name, ... )
__attribute__((format(printf, 1, 2)));
int vips_rename( const char *old_name, const char *new_name );
FILE *vips_popenf( const char *fmt, const char *mode, ... )
__attribute__((format(printf, 1, 3)));
/**
* VipsToken:
* @VIPS_TOKEN_LEFT: left bracket
* @VIPS_TOKEN_RIGHT: right bracket
* @VIPS_TOKEN_STRING: string constant
* @VIPS_TOKEN_EQUALS: equals sign
* @VIPS_TOKEN_COMMA: comma
*
* Tokens returned by the vips lexical analyzer, see vips__token_get(). This
* is used to parse option strings for arguments.
*
* Left and right brackets can be any of (, {, [, <.
*
* Strings may be in double quotes, and may contain escaped quote characters,
* for example string, "string" and "str\"ing".
*
*/
typedef enum {
VIPS_TOKEN_LEFT = 1,
VIPS_TOKEN_RIGHT,
VIPS_TOKEN_STRING,
VIPS_TOKEN_EQUALS,
VIPS_TOKEN_COMMA
} VipsToken;
const char *vips__token_get( const char *buffer,
VipsToken *token, char *string, int size );
const char *vips__token_must( const char *buffer, VipsToken *token,
char *string, int size );
const char *vips__token_need( const char *buffer, VipsToken need_token,
char *string, int size );
const char *vips__token_segment( const char *p, VipsToken *token,
char *string, int size );
const char *vips__token_segment_need( const char *p, VipsToken need_token,
char *string, int size );
const char *vips__find_rightmost_brackets( const char *p );
void vips__filename_split8( const char *name,
char *filename, char *option_string );
int vips_ispoweroftwo( int p );
int vips_amiMSBfirst( void );
char *vips__temp_name( const char *format );
void vips__change_suffix( const char *name, char *out, int mx,
const char *new_suff, const char **olds, int nolds );
char *vips_realpath( const char *path );
guint32 vips__random( guint32 seed );
guint32 vips__random_add( guint32 seed, int value );
const char *vips__icc_dir( void );
const char *vips__windows_prefix( void );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_UTIL_H*/

145
node_modules/sharp/vendor/include/vips/vector.h generated vendored Normal file
View File

@ -0,0 +1,145 @@
/* helper stuff for Orc
*
* 29/10/10
* - from im_dilate hackery
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_VECTOR_H
#define VIPS_VECTOR_H
#ifdef HAVE_ORC
#include <orc/orc.h>
#endif /*HAVE_ORC*/
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#define VIPS_VECTOR_SOURCE_MAX (10)
/* An Orc program.
*/
typedef struct {
/* Handy for debugging.
*/
const char *name;
char *unique_name;
/* How many resources we've used so far in this codegen.
*/
int n_temp;
int n_scanline;
int n_source;
int n_destination;
int n_constant;
int n_parameter;
int n_instruction;
/* The scanline sources, and for each variable, the associated line.
* "sl0" onwards.
*/
int sl[VIPS_VECTOR_SOURCE_MAX];
int line[VIPS_VECTOR_SOURCE_MAX];
/* Non-scanline sources, "s1" etc. s[0] is the var for "s1".
*/
int s[VIPS_VECTOR_SOURCE_MAX];
/* The destination var.
*/
int d1;
#ifdef HAVE_ORC
/* The code we have generated.
*/
OrcProgram *program;
#endif /*HAVE_ORC*/
/* Compiled successfully.
*/
gboolean compiled;
} VipsVector;
/* An executor.
*/
typedef struct {
#ifdef HAVE_ORC
OrcExecutor executor;
#endif /*HAVE_ORC*/
VipsVector *vector;
} VipsExecutor;
/* Set from the command-line.
*/
extern gboolean vips__vector_enabled;
void vips_vector_init( void );
gboolean vips_vector_isenabled( void );
void vips_vector_set_enabled( gboolean enabled );
void vips_vector_free( VipsVector *vector );
VipsVector *vips_vector_new( const char *name, int dsize );
void vips_vector_constant( VipsVector *vector,
char *name, int value, int size );
void vips_vector_source_scanline( VipsVector *vector,
char *name, int line, int size );
int vips_vector_source_name( VipsVector *vector, const char *name, int size );
void vips_vector_temporary( VipsVector *vector, const char *name, int size );
int vips_vector_parameter( VipsVector *vector, const char *name, int size );
int vips_vector_destination( VipsVector *vector, const char *name, int size );
void vips_vector_asm2( VipsVector *vector,
const char *op, const char *a, const char *b );
void vips_vector_asm3( VipsVector *vector,
const char *op, const char *a, const char *b, const char *c );
gboolean vips_vector_full( VipsVector *vector );
gboolean vips_vector_compile( VipsVector *vector );
void vips_vector_print( VipsVector *vector );
void vips_executor_set_program( VipsExecutor *executor,
VipsVector *vector, int n );
void vips_executor_set_scanline( VipsExecutor *executor,
VipsRegion *ir, int x, int y );
void vips_executor_set_destination( VipsExecutor *executor, void *value );
void vips_executor_set_parameter( VipsExecutor *executor, int var, int value );
void vips_executor_set_array( VipsExecutor *executor, int var, void *value );
void vips_executor_run( VipsExecutor *executor );
void vips_vector_to_fixed_point( double *in, int *out, int n, int scale );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_VECTOR_H*/

34
node_modules/sharp/vendor/include/vips/version.h generated vendored Normal file
View File

@ -0,0 +1,34 @@
/* Macros for the header version.
*/
#ifndef VIPS_VERSION_H
#define VIPS_VERSION_H
#define VIPS_VERSION "8.7.4"
#define VIPS_VERSION_STRING "8.7.4-Fri Jan 18 12:51:47 UTC 2019"
#define VIPS_MAJOR_VERSION (8)
#define VIPS_MINOR_VERSION (7)
#define VIPS_MICRO_VERSION (4)
/* The ABI version, as used for library versioning.
*/
#define VIPS_LIBRARY_CURRENT (51)
#define VIPS_LIBRARY_REVISION (5)
#define VIPS_LIBRARY_AGE (9)
/**
* VIPS_SONAME:
*
* The name of the shared object containing the vips library, for example
* "libvips.so.42", or "libvips-42.dll".
*/
#include "soname.h"
/* Not really anything to do with versions, but this is a handy place to put
* it.
*/
#define VIPS_EXEEXT ""
#define VIPS_ENABLE_DEPRECATED 1
#endif /*VIPS_VERSION_H*/

50
node_modules/sharp/vendor/include/vips/video.h generated vendored Normal file
View File

@ -0,0 +1,50 @@
/* video.h
*
* 20/9/09
* - from proto.h
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef IM_VIDEO_H
#define IM_VIDEO_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
int im_video_v4l1( VipsImage *im, const char *device,
int channel, int brightness, int colour, int contrast, int hue,
int ngrabs );
int im_video_test( VipsImage *im, int brightness, int error );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*IM_VIDEO_H*/

255
node_modules/sharp/vendor/include/vips/vips-operators.h generated vendored Normal file
View File

@ -0,0 +1,255 @@
// headers for vips operations
// Mon 11 Jun 14:21:32 BST 2018
// this file is generated automatically, do not edit!
static void system( char * cmd_format , VOption *options = 0 ) ;
VImage add( VImage right , VOption *options = 0 ) const ;
VImage subtract( VImage right , VOption *options = 0 ) const ;
VImage multiply( VImage right , VOption *options = 0 ) const ;
VImage divide( VImage right , VOption *options = 0 ) const ;
VImage relational( VImage right , VipsOperationRelational relational , VOption *options = 0 ) const ;
VImage remainder( VImage right , VOption *options = 0 ) const ;
VImage boolean( VImage right , VipsOperationBoolean boolean , VOption *options = 0 ) const ;
VImage math2( VImage right , VipsOperationMath2 math2 , VOption *options = 0 ) const ;
VImage complex2( VImage right , VipsOperationComplex2 cmplx , VOption *options = 0 ) const ;
VImage complexform( VImage right , VOption *options = 0 ) const ;
static VImage sum( std::vector<VImage> in , VOption *options = 0 ) ;
VImage invert( VOption *options = 0 ) const ;
VImage linear( std::vector<double> a , std::vector<double> b , VOption *options = 0 ) const ;
VImage math( VipsOperationMath math , VOption *options = 0 ) const ;
VImage abs( VOption *options = 0 ) const ;
VImage sign( VOption *options = 0 ) const ;
VImage round( VipsOperationRound round , VOption *options = 0 ) const ;
VImage relational_const( VipsOperationRelational relational , std::vector<double> c , VOption *options = 0 ) const ;
VImage remainder_const( std::vector<double> c , VOption *options = 0 ) const ;
VImage boolean_const( VipsOperationBoolean boolean , std::vector<double> c , VOption *options = 0 ) const ;
VImage math2_const( VipsOperationMath2 math2 , std::vector<double> c , VOption *options = 0 ) const ;
VImage complex( VipsOperationComplex cmplx , VOption *options = 0 ) const ;
VImage complexget( VipsOperationComplexget get , VOption *options = 0 ) const ;
double avg( VOption *options = 0 ) const ;
double min( VOption *options = 0 ) const ;
double max( VOption *options = 0 ) const ;
double deviate( VOption *options = 0 ) const ;
VImage stats( VOption *options = 0 ) const ;
VImage hist_find( VOption *options = 0 ) const ;
VImage hist_find_ndim( VOption *options = 0 ) const ;
VImage hist_find_indexed( VImage index , VOption *options = 0 ) const ;
VImage hough_line( VOption *options = 0 ) const ;
VImage hough_circle( VOption *options = 0 ) const ;
VImage project( VImage * rows , VOption *options = 0 ) const ;
VImage profile( VImage * rows , VOption *options = 0 ) const ;
VImage measure( int h , int v , VOption *options = 0 ) const ;
std::vector<double> getpoint( int x , int y , VOption *options = 0 ) const ;
int find_trim( int * top , int * width , int * height , VOption *options = 0 ) const ;
VImage copy( VOption *options = 0 ) const ;
VImage tilecache( VOption *options = 0 ) const ;
VImage linecache( VOption *options = 0 ) const ;
VImage sequential( VOption *options = 0 ) const ;
VImage cache( VOption *options = 0 ) const ;
VImage embed( int x , int y , int width , int height , VOption *options = 0 ) const ;
VImage gravity( VipsCompassDirection direction , int width , int height , VOption *options = 0 ) const ;
VImage flip( VipsDirection direction , VOption *options = 0 ) const ;
VImage insert( VImage sub , int x , int y , VOption *options = 0 ) const ;
VImage join( VImage in2 , VipsDirection direction , VOption *options = 0 ) const ;
static VImage arrayjoin( std::vector<VImage> in , VOption *options = 0 ) ;
VImage extract_area( int left , int top , int width , int height , VOption *options = 0 ) const ;
VImage smartcrop( int width , int height , VOption *options = 0 ) const ;
VImage extract_band( int band , VOption *options = 0 ) const ;
static VImage bandjoin( std::vector<VImage> in , VOption *options = 0 ) ;
VImage bandjoin_const( std::vector<double> c , VOption *options = 0 ) const ;
static VImage bandrank( std::vector<VImage> in , VOption *options = 0 ) ;
VImage bandmean( VOption *options = 0 ) const ;
VImage bandbool( VipsOperationBoolean boolean , VOption *options = 0 ) const ;
VImage replicate( int across , int down , VOption *options = 0 ) const ;
VImage cast( VipsBandFormat format , VOption *options = 0 ) const ;
VImage rot( VipsAngle angle , VOption *options = 0 ) const ;
VImage rot45( VOption *options = 0 ) const ;
VImage autorot( VOption *options = 0 ) const ;
VImage ifthenelse( VImage in1 , VImage in2 , VOption *options = 0 ) const ;
VImage recomb( VImage m , VOption *options = 0 ) const ;
VImage bandfold( VOption *options = 0 ) const ;
VImage bandunfold( VOption *options = 0 ) const ;
VImage flatten( VOption *options = 0 ) const ;
VImage premultiply( VOption *options = 0 ) const ;
VImage unpremultiply( VOption *options = 0 ) const ;
VImage grid( int tile_height , int across , int down , VOption *options = 0 ) const ;
VImage transpose3d( VOption *options = 0 ) const ;
VImage scale( VOption *options = 0 ) const ;
VImage wrap( VOption *options = 0 ) const ;
VImage zoom( int xfac , int yfac , VOption *options = 0 ) const ;
VImage subsample( int xfac , int yfac , VOption *options = 0 ) const ;
VImage msb( VOption *options = 0 ) const ;
VImage byteswap( VOption *options = 0 ) const ;
VImage falsecolour( VOption *options = 0 ) const ;
VImage gamma( VOption *options = 0 ) const ;
static VImage composite( std::vector<VImage> in , std::vector<int> mode , VOption *options = 0 ) ;
VImage composite2( VImage overlay , VipsBlendMode mode , VOption *options = 0 ) const ;
static VImage black( int width , int height , VOption *options = 0 ) ;
static VImage gaussnoise( int width , int height , VOption *options = 0 ) ;
static VImage text( char * text , VOption *options = 0 ) ;
static VImage xyz( int width , int height , VOption *options = 0 ) ;
static VImage gaussmat( double sigma , double min_ampl , VOption *options = 0 ) ;
static VImage logmat( double sigma , double min_ampl , VOption *options = 0 ) ;
static VImage eye( int width , int height , VOption *options = 0 ) ;
static VImage grey( int width , int height , VOption *options = 0 ) ;
static VImage zone( int width , int height , VOption *options = 0 ) ;
static VImage sines( int width , int height , VOption *options = 0 ) ;
static VImage mask_ideal( int width , int height , double frequency_cutoff , VOption *options = 0 ) ;
static VImage mask_ideal_ring( int width , int height , double frequency_cutoff , double ringwidth , VOption *options = 0 ) ;
static VImage mask_ideal_band( int width , int height , double frequency_cutoff_x , double frequency_cutoff_y , double radius , VOption *options = 0 ) ;
static VImage mask_butterworth( int width , int height , double order , double frequency_cutoff , double amplitude_cutoff , VOption *options = 0 ) ;
static VImage mask_butterworth_ring( int width , int height , double order , double frequency_cutoff , double amplitude_cutoff , double ringwidth , VOption *options = 0 ) ;
static VImage mask_butterworth_band( int width , int height , double order , double frequency_cutoff_x , double frequency_cutoff_y , double radius , double amplitude_cutoff , VOption *options = 0 ) ;
static VImage mask_gaussian( int width , int height , double frequency_cutoff , double amplitude_cutoff , VOption *options = 0 ) ;
static VImage mask_gaussian_ring( int width , int height , double frequency_cutoff , double amplitude_cutoff , double ringwidth , VOption *options = 0 ) ;
static VImage mask_gaussian_band( int width , int height , double frequency_cutoff_x , double frequency_cutoff_y , double radius , double amplitude_cutoff , VOption *options = 0 ) ;
static VImage mask_fractal( int width , int height , double fractal_dimension , VOption *options = 0 ) ;
VImage buildlut( VOption *options = 0 ) const ;
VImage invertlut( VOption *options = 0 ) const ;
static VImage tonelut( VOption *options = 0 ) ;
static VImage identity( VOption *options = 0 ) ;
static VImage fractsurf( int width , int height , double fractal_dimension , VOption *options = 0 ) ;
static VImage worley( int width , int height , VOption *options = 0 ) ;
static VImage perlin( int width , int height , VOption *options = 0 ) ;
static VImage csvload( char * filename , VOption *options = 0 ) ;
static VImage matrixload( char * filename , VOption *options = 0 ) ;
static VImage rawload( char * filename , int width , int height , int bands , VOption *options = 0 ) ;
static VImage vipsload( char * filename , VOption *options = 0 ) ;
static VImage analyzeload( char * filename , VOption *options = 0 ) ;
static VImage ppmload( char * filename , VOption *options = 0 ) ;
static VImage radload( char * filename , VOption *options = 0 ) ;
static VImage pdfload( char * filename , VOption *options = 0 ) ;
static VImage pdfload_buffer( VipsBlob * buffer , VOption *options = 0 ) ;
static VImage svgload( char * filename , VOption *options = 0 ) ;
static VImage svgload_buffer( VipsBlob * buffer , VOption *options = 0 ) ;
static VImage gifload( char * filename , VOption *options = 0 ) ;
static VImage gifload_buffer( VipsBlob * buffer , VOption *options = 0 ) ;
static VImage pngload( char * filename , VOption *options = 0 ) ;
static VImage pngload_buffer( VipsBlob * buffer , VOption *options = 0 ) ;
static VImage matload( char * filename , VOption *options = 0 ) ;
static VImage jpegload( char * filename , VOption *options = 0 ) ;
static VImage jpegload_buffer( VipsBlob * buffer , VOption *options = 0 ) ;
static VImage webpload( char * filename , VOption *options = 0 ) ;
static VImage webpload_buffer( VipsBlob * buffer , VOption *options = 0 ) ;
static VImage tiffload( char * filename , VOption *options = 0 ) ;
static VImage tiffload_buffer( VipsBlob * buffer , VOption *options = 0 ) ;
static VImage openslideload( char * filename , VOption *options = 0 ) ;
static VImage magickload( char * filename , VOption *options = 0 ) ;
static VImage magickload_buffer( VipsBlob * buffer , VOption *options = 0 ) ;
static VImage fitsload( char * filename , VOption *options = 0 ) ;
static VImage openexrload( char * filename , VOption *options = 0 ) ;
void csvsave( char * filename , VOption *options = 0 ) const ;
void matrixsave( char * filename , VOption *options = 0 ) const ;
void matrixprint( VOption *options = 0 ) const ;
void rawsave( char * filename , VOption *options = 0 ) const ;
void rawsave_fd( int fd , VOption *options = 0 ) const ;
void vipssave( char * filename , VOption *options = 0 ) const ;
void ppmsave( char * filename , VOption *options = 0 ) const ;
void radsave( char * filename , VOption *options = 0 ) const ;
VipsBlob * radsave_buffer( VOption *options = 0 ) const ;
void dzsave( char * filename , VOption *options = 0 ) const ;
VipsBlob * dzsave_buffer( VOption *options = 0 ) const ;
void pngsave( char * filename , VOption *options = 0 ) const ;
VipsBlob * pngsave_buffer( VOption *options = 0 ) const ;
void jpegsave( char * filename , VOption *options = 0 ) const ;
VipsBlob * jpegsave_buffer( VOption *options = 0 ) const ;
void jpegsave_mime( VOption *options = 0 ) const ;
void webpsave( char * filename , VOption *options = 0 ) const ;
VipsBlob * webpsave_buffer( VOption *options = 0 ) const ;
void tiffsave( char * filename , VOption *options = 0 ) const ;
VipsBlob * tiffsave_buffer( VOption *options = 0 ) const ;
void magicksave( char * filename , VOption *options = 0 ) const ;
VipsBlob * magicksave_buffer( VOption *options = 0 ) const ;
void fitssave( char * filename , VOption *options = 0 ) const ;
static VImage thumbnail( char * filename , int width , VOption *options = 0 ) ;
static VImage thumbnail_buffer( VipsBlob * buffer , int width , VOption *options = 0 ) ;
VImage thumbnail_image( int width , VOption *options = 0 ) const ;
VImage mapim( VImage index , VOption *options = 0 ) const ;
VImage shrink( double hshrink , double vshrink , VOption *options = 0 ) const ;
VImage shrinkh( int hshrink , VOption *options = 0 ) const ;
VImage shrinkv( int vshrink , VOption *options = 0 ) const ;
VImage reduceh( double hshrink , VOption *options = 0 ) const ;
VImage reducev( double vshrink , VOption *options = 0 ) const ;
VImage reduce( double hshrink , double vshrink , VOption *options = 0 ) const ;
VImage quadratic( VImage coeff , VOption *options = 0 ) const ;
VImage affine( std::vector<double> matrix , VOption *options = 0 ) const ;
VImage similarity( VOption *options = 0 ) const ;
VImage rotate( double angle , VOption *options = 0 ) const ;
VImage resize( double scale , VOption *options = 0 ) const ;
VImage colourspace( VipsInterpretation space , VOption *options = 0 ) const ;
VImage Lab2XYZ( VOption *options = 0 ) const ;
VImage XYZ2Lab( VOption *options = 0 ) const ;
VImage Lab2LCh( VOption *options = 0 ) const ;
VImage LCh2Lab( VOption *options = 0 ) const ;
VImage LCh2CMC( VOption *options = 0 ) const ;
VImage CMC2LCh( VOption *options = 0 ) const ;
VImage XYZ2Yxy( VOption *options = 0 ) const ;
VImage Yxy2XYZ( VOption *options = 0 ) const ;
VImage scRGB2XYZ( VOption *options = 0 ) const ;
VImage XYZ2scRGB( VOption *options = 0 ) const ;
VImage LabQ2Lab( VOption *options = 0 ) const ;
VImage Lab2LabQ( VOption *options = 0 ) const ;
VImage LabQ2LabS( VOption *options = 0 ) const ;
VImage LabS2LabQ( VOption *options = 0 ) const ;
VImage LabS2Lab( VOption *options = 0 ) const ;
VImage Lab2LabS( VOption *options = 0 ) const ;
VImage rad2float( VOption *options = 0 ) const ;
VImage float2rad( VOption *options = 0 ) const ;
VImage LabQ2sRGB( VOption *options = 0 ) const ;
VImage sRGB2HSV( VOption *options = 0 ) const ;
VImage HSV2sRGB( VOption *options = 0 ) const ;
VImage icc_import( VOption *options = 0 ) const ;
VImage icc_export( VOption *options = 0 ) const ;
VImage icc_transform( char * output_profile , VOption *options = 0 ) const ;
VImage dE76( VImage right , VOption *options = 0 ) const ;
VImage dE00( VImage right , VOption *options = 0 ) const ;
VImage dECMC( VImage right , VOption *options = 0 ) const ;
VImage sRGB2scRGB( VOption *options = 0 ) const ;
VImage scRGB2BW( VOption *options = 0 ) const ;
VImage scRGB2sRGB( VOption *options = 0 ) const ;
VImage maplut( VImage lut , VOption *options = 0 ) const ;
int percent( double percent , VOption *options = 0 ) const ;
VImage stdif( int width , int height , VOption *options = 0 ) const ;
VImage hist_cum( VOption *options = 0 ) const ;
VImage hist_match( VImage ref , VOption *options = 0 ) const ;
VImage hist_norm( VOption *options = 0 ) const ;
VImage hist_equal( VOption *options = 0 ) const ;
VImage hist_plot( VOption *options = 0 ) const ;
VImage hist_local( int width , int height , VOption *options = 0 ) const ;
bool hist_ismonotonic( VOption *options = 0 ) const ;
double hist_entropy( VOption *options = 0 ) const ;
VImage conv( VImage mask , VOption *options = 0 ) const ;
VImage conva( VImage mask , VOption *options = 0 ) const ;
VImage convf( VImage mask , VOption *options = 0 ) const ;
VImage convi( VImage mask , VOption *options = 0 ) const ;
VImage compass( VImage mask , VOption *options = 0 ) const ;
VImage convsep( VImage mask , VOption *options = 0 ) const ;
VImage convasep( VImage mask , VOption *options = 0 ) const ;
VImage fastcor( VImage ref , VOption *options = 0 ) const ;
VImage spcor( VImage ref , VOption *options = 0 ) const ;
VImage sharpen( VOption *options = 0 ) const ;
VImage gaussblur( double sigma , VOption *options = 0 ) const ;
VImage canny( VOption *options = 0 ) const ;
VImage sobel( VOption *options = 0 ) const ;
VImage fwfft( VOption *options = 0 ) const ;
VImage invfft( VOption *options = 0 ) const ;
VImage freqmult( VImage mask , VOption *options = 0 ) const ;
VImage spectrum( VOption *options = 0 ) const ;
VImage phasecor( VImage in2 , VOption *options = 0 ) const ;
VImage morph( VImage mask , VipsOperationMorphology morph , VOption *options = 0 ) const ;
VImage rank( int width , int height , int index , VOption *options = 0 ) const ;
double countlines( VipsDirection direction , VOption *options = 0 ) const ;
VImage labelregions( VOption *options = 0 ) const ;
VImage fill_nearest( VOption *options = 0 ) const ;
void draw_rect( std::vector<double> ink , int left , int top , int width , int height , VOption *options = 0 ) const ;
void draw_mask( std::vector<double> ink , VImage mask , int x , int y , VOption *options = 0 ) const ;
void draw_line( std::vector<double> ink , int x1 , int y1 , int x2 , int y2 , VOption *options = 0 ) const ;
void draw_circle( std::vector<double> ink , int cx , int cy , int radius , VOption *options = 0 ) const ;
void draw_flood( std::vector<double> ink , int x , int y , VOption *options = 0 ) const ;
void draw_image( VImage sub , int x , int y , VOption *options = 0 ) const ;
void draw_smudge( int left , int top , int width , int height , VOption *options = 0 ) const ;
VImage merge( VImage sec , VipsDirection direction , int dx , int dy , VOption *options = 0 ) const ;
VImage mosaic( VImage sec , VipsDirection direction , int xref , int yref , int xsec , int ysec , VOption *options = 0 ) const ;
VImage mosaic1( VImage sec , VipsDirection direction , int xr1 , int yr1 , int xs1 , int ys1 , int xr2 , int yr2 , int xs2 , int ys2 , VOption *options = 0 ) const ;
VImage match( VImage sec , int xr1 , int yr1 , int xs1 , int ys1 , int xr2 , int yr2 , int xs2 , int ys2 , VOption *options = 0 ) const ;
VImage globalbalance( VOption *options = 0 ) const ;

187
node_modules/sharp/vendor/include/vips/vips.h generated vendored Normal file
View File

@ -0,0 +1,187 @@
/* @(#) Header file for Birkbeck/VIPS Image Processing Library
* Authors: N. Dessipris, K. Martinez, Birkbeck College, London.
* Sept 94
*
* 15/7/96 JC
* - now does C++ extern stuff
* - many more protos
* 15/4/97 JC
* - protos split out
* 4/3/98 JC
* - IM_ANY added
* - sRGB colourspace added
* 28/10/98 JC
* - VASARI_MAGIC_INTEL and VASARI_MAGIC_SPARC added
* 29/9/99 JC
* - new locks for threading, no more threadgroup stuff in IMAGE
* 30/11/00 JC
* - override RGB/CMYK macros on cygwin
* 21/9/02 JC
* - new Xoffset/Yoffset fields
* - rationalized macro names
* 6/6/05 Markus Wollgarten
* - added Meta header field
* 31/7/05
* - added meta.h for new metadata API
* 22/8/05
* - scrapped stupid VAS_HD
* 30/9/05
* - added sizeof_header field for mmap window read of RAW files
* 4/10/05
* - now you have to define IM_ENABLE_DEPRECATED to get broken #defined
* 5/10/05
* - added GNUC attributes
* 8/5/06
* - added RGB16, GREY16
* 30/10/06
* - added im_window_t
* 7/11/07
* - added preclose and evalstart callbacks
* - brought time struct in here
* 7/3/08
* - MAGIC values should be unsigned
* 2/7/08
* - added invalidate callbacks
* 7/8/08
* - include <time.h>, 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
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_VIPS_H
#define VIPS_VIPS_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#include <glib.h>
#include <glib/gstdio.h>
#include <gmodule.h>
#include <glib-object.h>
/* If we're being parsed by SWIG, remove gcc attributes.
*/
#ifdef SWIG
# ifndef __attribute__
# define __attribute__(x) /*NOTHING*/
# endif
#endif /*SWIG*/
/* Or if this isn't gcc.
*/
#ifndef __GNUC__
# ifndef __attribute__
# define __attribute__(x) /*NOTHING*/
# endif
#endif /*__GNUC__*/
#include <vips/basic.h>
#include <vips/buf.h>
#include <vips/dbuf.h>
#include <vips/util.h>
#include <vips/object.h>
#include <vips/type.h>
#include <vips/gate.h>
#include <vips/version.h>
#include <vips/rect.h>
#include <vips/private.h>
#include <vips/mask.h>
#include <vips/image.h>
#include <vips/memory.h>
#include <vips/error.h>
#include <vips/format.h>
#include <vips/region.h>
#include <vips/generate.h>
#include <vips/interpolate.h>
#include <vips/semaphore.h>
#include <vips/threadpool.h>
#include <vips/header.h>
#include <vips/operation.h>
#include <vips/foreign.h>
#include <vips/enumtypes.h>
#include <vips/arithmetic.h>
#include <vips/conversion.h>
#include <vips/convolution.h>
#include <vips/morphology.h>
#include <vips/mosaicing.h>
#include <vips/histogram.h>
#include <vips/freqfilt.h>
#include <vips/resample.h>
#include <vips/colour.h>
#include <vips/draw.h>
#include <vips/create.h>
#include <vips/video.h>
#include <vips/cimg_funcs.h>
/* We can't use _ here since this will be compiled by our clients and they may
* not have _().
*/
#define VIPS_INIT( ARGV0 ) \
(vips_version( 3 ) - vips_version( 5 ) != \
VIPS_LIBRARY_CURRENT - VIPS_LIBRARY_AGE ? ( \
g_warning( "ABI mismatch" ), \
g_warning( "library has ABI version %d", \
vips_version( 3 ) - vips_version( 5 ) ), \
g_warning( "application needs ABI version %d", \
VIPS_LIBRARY_CURRENT - VIPS_LIBRARY_AGE ), \
vips_error( "vips_init", "ABI mismatch" ), \
-1 ) : \
vips_init( ARGV0 ))
int vips_init( const char *argv0 );
const char *vips_get_argv0( void );
void vips_shutdown( void );
void vips_thread_shutdown( void );
void vips_add_option_entries( GOptionGroup *option_group );
extern void vips_leak_set( gboolean leak );
const char *vips_version_string( void );
int vips_version( int flag );
const char *vips_guess_prefix( const char *argv0, const char *env_name );
const char *vips_guess_libdir( const char *argv0, const char *env_name );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_VIPS_H*/

1240
node_modules/sharp/vendor/include/vips/vips7compat.h generated vendored Normal file

File diff suppressed because it is too large Load Diff

56
node_modules/sharp/vendor/include/vips/vips8 generated vendored Normal file
View File

@ -0,0 +1,56 @@
// Include file to get vips C++ binding
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_CPLUSPLUS
#define VIPS_CPLUSPLUS
#include <vips/version.h>
#include <glib-object.h>
/* Define VIPS_CPLUSPLUS_EXPORTS to build a DLL using MSVC.
*/
#ifdef _MSC_VER
# ifdef VIPS_CPLUSPLUS_EXPORTS
# define VIPS_CPLUSPLUS_API __declspec(dllexport)
# else
# define VIPS_CPLUSPLUS_API __declspec(dllimport)
# endif
#else
# define VIPS_CPLUSPLUS_API
#endif
#define VIPS_NAMESPACE_START namespace vips {
#define VIPS_NAMESPACE_END }
#include "VError8.h"
#include "VImage8.h"
#include "VInterpolate8.h"
#endif /*VIPS_CPLUSPLUS*/