phew all done
iofuncs is now all on the vips_ namespace, and all revised, hopefully
This commit is contained in:
parent
4120f7b296
commit
8ddc805878
@ -3,7 +3,7 @@
|
|||||||
if ENABLE_CXX
|
if ENABLE_CXX
|
||||||
C_COMPILE_DIR = libvipsCC
|
C_COMPILE_DIR = libvipsCC
|
||||||
C_DIST_DIR =
|
C_DIST_DIR =
|
||||||
C_PKGCONFIG = vipsCC-7.${IM_MINOR_VERSION}.pc
|
C_PKGCONFIG = vipsCC-7.${VIPS_MINOR_VERSION}.pc
|
||||||
|
|
||||||
# turn on Python if we can (requires C++)
|
# turn on Python if we can (requires C++)
|
||||||
if HAVE_PYTHON
|
if HAVE_PYTHON
|
||||||
@ -31,15 +31,15 @@ EXTRA_DIST = \
|
|||||||
m4 \
|
m4 \
|
||||||
benchmark \
|
benchmark \
|
||||||
bootstrap.sh \
|
bootstrap.sh \
|
||||||
vips-7.${IM_MINOR_VERSION}.pc.in \
|
vips-7.${VIPS_MINOR_VERSION}.pc.in \
|
||||||
vipsCC-7.${IM_MINOR_VERSION}.pc.in \
|
vipsCC-7.${VIPS_MINOR_VERSION}.pc.in \
|
||||||
acinclude.m4 \
|
acinclude.m4 \
|
||||||
depcomp \
|
depcomp \
|
||||||
$(C_DIST_DIR) \
|
$(C_DIST_DIR) \
|
||||||
$(P_DIST_DIR)
|
$(P_DIST_DIR)
|
||||||
|
|
||||||
pkgconfigdir = $(libdir)/pkgconfig
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
pkgconfig_DATA = vips-7.${IM_MINOR_VERSION}.pc $(C_PKGCONFIG)
|
pkgconfig_DATA = vips-7.${VIPS_MINOR_VERSION}.pc $(C_PKGCONFIG)
|
||||||
|
|
||||||
install-exec-hook:
|
install-exec-hook:
|
||||||
-rm -rf ${DESTDIR}$(datadir)/doc/vips
|
-rm -rf ${DESTDIR}$(datadir)/doc/vips
|
||||||
|
36
configure.in
36
configure.in
@ -10,13 +10,13 @@ m4_define([vips_micro_version], [0])
|
|||||||
m4_define([vips_version],
|
m4_define([vips_version],
|
||||||
[vips_major_version.vips_minor_version.vips_micro_version])
|
[vips_major_version.vips_minor_version.vips_micro_version])
|
||||||
|
|
||||||
IM_MAJOR_VERSION=vips_major_version
|
VIPS_MAJOR_VERSION=vips_major_version
|
||||||
IM_MINOR_VERSION=vips_minor_version
|
VIPS_MINOR_VERSION=vips_minor_version
|
||||||
IM_MICRO_VERSION=vips_micro_version
|
VIPS_MICRO_VERSION=vips_micro_version
|
||||||
IM_VERSION=vips_version()
|
VIPS_VERSION=vips_version()
|
||||||
IM_VERSION_STRING=$IM_VERSION-`date`
|
VIPS_VERSION_STRING=$VIPS_VERSION-`date`
|
||||||
|
|
||||||
VERSION=$IM_VERSION
|
VERSION=$VIPS_VERSION
|
||||||
PACKAGE=vips
|
PACKAGE=vips
|
||||||
|
|
||||||
# libtool library versioning ... not user-visible (except as part of the
|
# libtool library versioning ... not user-visible (except as part of the
|
||||||
@ -35,11 +35,11 @@ LIBRARY_AGE=15
|
|||||||
AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
|
AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
|
||||||
|
|
||||||
# patched into include/vips/version.h
|
# patched into include/vips/version.h
|
||||||
AC_SUBST(IM_VERSION)
|
AC_SUBST(VIPS_VERSION)
|
||||||
AC_SUBST(IM_VERSION_STRING)
|
AC_SUBST(VIPS_VERSION_STRING)
|
||||||
AC_SUBST(IM_MAJOR_VERSION)
|
AC_SUBST(VIPS_MAJOR_VERSION)
|
||||||
AC_SUBST(IM_MINOR_VERSION)
|
AC_SUBST(VIPS_MINOR_VERSION)
|
||||||
AC_SUBST(IM_MICRO_VERSION)
|
AC_SUBST(VIPS_MICRO_VERSION)
|
||||||
|
|
||||||
# put into library name by libsrc/Makefile.am and libsrcCC/Makefile.am
|
# put into library name by libsrc/Makefile.am and libsrcCC/Makefile.am
|
||||||
AC_SUBST(LIBRARY_CURRENT)
|
AC_SUBST(LIBRARY_CURRENT)
|
||||||
@ -173,7 +173,7 @@ fi
|
|||||||
|
|
||||||
# we need a fully expanded version of $libdir
|
# we need a fully expanded version of $libdir
|
||||||
# without this we get something like
|
# without this we get something like
|
||||||
# define IM_LIBDIR ${exec_prefix}/lib
|
# define VIPS_LIBDIR ${exec_prefix}/lib
|
||||||
# argh
|
# argh
|
||||||
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
|
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
|
||||||
|
|
||||||
@ -187,13 +187,13 @@ expand () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
expand $libdir
|
expand $libdir
|
||||||
IM_LIBDIR=$expanded_value
|
VIPS_LIBDIR=$expanded_value
|
||||||
|
|
||||||
# vips.c/im_guess_prefix.c need to know the exe suffix and (as a fallback)
|
# vips.c/im_guess_prefix.c need to know the exe suffix and (as a fallback)
|
||||||
# the configure-time install prefix
|
# the configure-time install prefix
|
||||||
AC_DEFINE_UNQUOTED(IM_EXEEXT,"$EXEEXT",[extension for executable files])
|
AC_DEFINE_UNQUOTED(VIPS_EXEEXT,"$EXEEXT",[extension for executable files])
|
||||||
AC_DEFINE_UNQUOTED(IM_PREFIX,"$prefix",[configure-time install prefix])
|
AC_DEFINE_UNQUOTED(VIPS_PREFIX,"$prefix",[configure-time install prefix])
|
||||||
AC_DEFINE_UNQUOTED(IM_LIBDIR,"$IM_LIBDIR",[configure-time library directory])
|
AC_DEFINE_UNQUOTED(VIPS_LIBDIR,"$VIPS_LIBDIR",[configure-time library directory])
|
||||||
|
|
||||||
# i18n
|
# i18n
|
||||||
GETTEXT_PACKAGE=vips7
|
GETTEXT_PACKAGE=vips7
|
||||||
@ -601,7 +601,7 @@ VIPS_LIBS="$MAGICK_LIBS $PNG_LIBS $TIFF_LIBS $ZIP_LIBS $JPEG_LIBS $GTHREAD_LIBS
|
|||||||
|
|
||||||
# we need this to generate paths in swig/python/setup.py.in
|
# we need this to generate paths in swig/python/setup.py.in
|
||||||
AC_SUBST(top_srcdir)
|
AC_SUBST(top_srcdir)
|
||||||
AC_SUBST(IM_LIBDIR)
|
AC_SUBST(VIPS_LIBDIR)
|
||||||
|
|
||||||
AC_SUBST(VIPS_CFLAGS)
|
AC_SUBST(VIPS_CFLAGS)
|
||||||
AC_SUBST(VIPS_INCLUDES)
|
AC_SUBST(VIPS_INCLUDES)
|
||||||
@ -610,7 +610,7 @@ AC_SUBST(VIPS_CXX_LIBS)
|
|||||||
AC_SUBST(PACKAGES_USED)
|
AC_SUBST(PACKAGES_USED)
|
||||||
|
|
||||||
# you'd think we could have
|
# you'd think we could have
|
||||||
# vips-$IM_MAJOR_VERSION.$IM_MINOR_VERSION.pc
|
# vips-$VIPS_MAJOR_VERSION.$VIPS_MINOR_VERSION.pc
|
||||||
# in AC_OUTPUT, but that seems to break for some combinations of sh/m4
|
# in AC_OUTPUT, but that seems to break for some combinations of sh/m4
|
||||||
AC_OUTPUT([
|
AC_OUTPUT([
|
||||||
vips-7.25.pc
|
vips-7.25.pc
|
||||||
|
@ -27,8 +27,8 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef IM_DEBUG_H
|
#ifndef VIPS_DEBUG_H
|
||||||
#define IM_DEBUG_H
|
#define VIPS_DEBUG_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -70,4 +70,4 @@ extern "C" {
|
|||||||
}
|
}
|
||||||
#endif /*__cplusplus*/
|
#endif /*__cplusplus*/
|
||||||
|
|
||||||
#endif /* IM_DEBUG_H */
|
#endif /* VIPS_DEBUG_H */
|
||||||
|
@ -27,8 +27,8 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef IM_ERROR_H
|
#ifndef VIPS_ERROR_H
|
||||||
#define IM_ERROR_H
|
#define VIPS_ERROR_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -87,4 +87,4 @@ int vips_check_dmask( const char *domain, DOUBLEMASK *mask );
|
|||||||
}
|
}
|
||||||
#endif /*__cplusplus*/
|
#endif /*__cplusplus*/
|
||||||
|
|
||||||
#endif /*!IM_ERROR_H*/
|
#endif /*VIPS_ERROR_H*/
|
||||||
|
@ -29,8 +29,8 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef IM_GENERATE_H
|
#ifndef VIPS_GENERATE_H
|
||||||
#define IM_GENERATE_H
|
#define VIPS_GENERATE_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -61,4 +61,4 @@ int vips_demand_hint( VipsImage *image, VipsDemandStyle hint, ... )
|
|||||||
}
|
}
|
||||||
#endif /*__cplusplus*/
|
#endif /*__cplusplus*/
|
||||||
|
|
||||||
#endif /*IM_GENERATE_H*/
|
#endif /*VIPS_GENERATE_H*/
|
||||||
|
@ -30,8 +30,8 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef IM_HEADER_H
|
#ifndef VIPS_HEADER_H
|
||||||
#define IM_HEADER_H
|
#define VIPS_HEADER_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -182,4 +182,4 @@ const char *vips_image_get_history( VipsImage *image );
|
|||||||
}
|
}
|
||||||
#endif /*__cplusplus*/
|
#endif /*__cplusplus*/
|
||||||
|
|
||||||
#endif /*IM_HEADER_H*/
|
#endif /*VIPS_HEADER_H*/
|
||||||
|
@ -181,7 +181,7 @@ typedef struct _VipsImage {
|
|||||||
/* Derived fields that some code can fiddle with. New code should use
|
/* Derived fields that some code can fiddle with. New code should use
|
||||||
* vips_image_get_history() and friends.
|
* vips_image_get_history() and friends.
|
||||||
*/
|
*/
|
||||||
char *Hist; /* don't use ... call im_history_get() */
|
char *Hist; /* don't use, see vips_image_get_history() */
|
||||||
char *filename; /* pointer to copy of filename */
|
char *filename; /* pointer to copy of filename */
|
||||||
char *data; /* start of image data for WIO */
|
char *data; /* start of image data for WIO */
|
||||||
int kill; /* set to non-zero to block eval */
|
int kill; /* set to non-zero to block eval */
|
||||||
@ -198,7 +198,7 @@ typedef struct _VipsImage {
|
|||||||
guint32 magic; /* magic from header, endian-ness of image */
|
guint32 magic; /* magic from header, endian-ness of image */
|
||||||
|
|
||||||
/* Partial image stuff. All private! All these fields are initialised
|
/* Partial image stuff. All private! All these fields are initialised
|
||||||
* to NULL and ignored unless set by im_generate() or im_partial().
|
* to NULL and ignored unless set by vips_image_generate() etc.
|
||||||
*/
|
*/
|
||||||
void *(*start)(); /* user-supplied start function */
|
void *(*start)(); /* user-supplied start function */
|
||||||
int (*generate)(); /* user-supplied generate function */
|
int (*generate)(); /* user-supplied generate function */
|
||||||
@ -209,7 +209,7 @@ typedef struct _VipsImage {
|
|||||||
GSList *regions; /* list of regions current for this image */
|
GSList *regions; /* list of regions current for this image */
|
||||||
VipsDemandStyle dhint; /* demand style hint */
|
VipsDemandStyle dhint; /* demand style hint */
|
||||||
|
|
||||||
/* Extra user-defined fields ... see im_meta_get_int() etc.
|
/* Extra user-defined fields ... see vips_image_get() etc.
|
||||||
*/
|
*/
|
||||||
GHashTable *meta; /* GhashTable of GValue */
|
GHashTable *meta; /* GhashTable of GValue */
|
||||||
GSList *meta_traverse; /* traverse order for Meta */
|
GSList *meta_traverse; /* traverse order for Meta */
|
||||||
@ -222,12 +222,12 @@ typedef struct _VipsImage {
|
|||||||
|
|
||||||
/* If this is a large disc image, don't map the whole thing, instead
|
/* 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
|
* have a set of windows shared between the regions active on the
|
||||||
* image. List of im_window_t.
|
* image. List of VipsWindow.
|
||||||
*/
|
*/
|
||||||
GSList *windows;
|
GSList *windows;
|
||||||
|
|
||||||
/* Upstream/downstream relationships, built from args to
|
/* Upstream/downstream relationships, built from args to
|
||||||
* im_demand_hint().
|
* vips_demand_hint().
|
||||||
*
|
*
|
||||||
* We use these to invalidate downstream pixel buffers.
|
* We use these to invalidate downstream pixel buffers.
|
||||||
* Use 'serial' to spot circular dependencies.
|
* Use 'serial' to spot circular dependencies.
|
||||||
@ -256,10 +256,10 @@ typedef struct _VipsImage {
|
|||||||
*/
|
*/
|
||||||
gint64 file_length;
|
gint64 file_length;
|
||||||
|
|
||||||
/* Set this when im_demand_hint_array() is called, and check in any
|
/* Set this when vips_demand_hint_array() is called, and check in any
|
||||||
* operation that will demand pixels from the image.
|
* operation that will demand pixels from the image.
|
||||||
*
|
*
|
||||||
* We use im_demand_hint_array() to build the tree of
|
* We use vips_demand_hint_array() to build the tree of
|
||||||
* upstream/downstream relationships, so it's a mandatory thing.
|
* upstream/downstream relationships, so it's a mandatory thing.
|
||||||
*/
|
*/
|
||||||
gboolean hint_set;
|
gboolean hint_set;
|
||||||
@ -285,7 +285,8 @@ typedef struct _VipsImageClass {
|
|||||||
void (*posteval)( VipsImage *image, VipsProgress *progress );
|
void (*posteval)( VipsImage *image, VipsProgress *progress );
|
||||||
|
|
||||||
/* An image has been written to.
|
/* An image has been written to.
|
||||||
* Used by eg. im_open("x.jpg", "w") to do the final write to jpeg.
|
* Used by eg. vips_image_new_from_file("x.jpg", "w") to do the
|
||||||
|
* final write to jpeg.
|
||||||
* Set *result to non-zero to indicate an error on write.
|
* Set *result to non-zero to indicate an error on write.
|
||||||
*/
|
*/
|
||||||
void (*written)( VipsImage *image, int *result );
|
void (*written)( VipsImage *image, int *result );
|
||||||
|
@ -31,8 +31,8 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef IM_INTERNAL_H
|
#ifndef VIPS_INTERNAL_H
|
||||||
#define IM_INTERNAL_H
|
#define VIPS_INTERNAL_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -57,23 +57,23 @@ int vips__meta_cp( VipsImage *, const VipsImage * );
|
|||||||
|
|
||||||
/* Default tile geometry.
|
/* Default tile geometry.
|
||||||
*/
|
*/
|
||||||
extern int im__tile_width;
|
extern int vips__tile_width;
|
||||||
extern int im__tile_height;
|
extern int vips__tile_height;
|
||||||
extern int im__fatstrip_height;
|
extern int vips__fatstrip_height;
|
||||||
extern int im__thinstrip_height;
|
extern int vips__thinstrip_height;
|
||||||
|
|
||||||
/* Default n threads.
|
/* Default n threads.
|
||||||
*/
|
*/
|
||||||
extern int im__concurrency;
|
extern int vips__concurrency;
|
||||||
|
|
||||||
/* Give progress feedback.
|
/* Give progress feedback.
|
||||||
*/
|
*/
|
||||||
extern int im__progress;
|
extern int vips__progress;
|
||||||
|
|
||||||
/* A string giving the image size (in bytes of uncompressed image) above which
|
/* A string giving the image size (in bytes of uncompressed image) above which
|
||||||
* we decompress to disc on open.
|
* we decompress to disc on open.
|
||||||
*/
|
*/
|
||||||
extern char *im__disc_threshold;
|
extern char *vips__disc_threshold;
|
||||||
|
|
||||||
typedef int (*im__fftproc_fn)( VipsImage *, VipsImage *, VipsImage * );
|
typedef int (*im__fftproc_fn)( VipsImage *, VipsImage *, VipsImage * );
|
||||||
|
|
||||||
@ -83,6 +83,20 @@ int vips__open_image_read( const char *filename );
|
|||||||
int vips_image_open_input( VipsImage *image );
|
int vips_image_open_input( VipsImage *image );
|
||||||
int vips_image_open_output( VipsImage *image );
|
int vips_image_open_output( VipsImage *image );
|
||||||
|
|
||||||
|
void vips__link_break_all( VipsImage *im );
|
||||||
|
void *vips__link_map( VipsImage *im, VipsSListMap2Fn fn, void *a, void *b );
|
||||||
|
|
||||||
|
char *vips__b64_encode( const unsigned char *data, size_t data_length );
|
||||||
|
unsigned char *vips__b64_decode( const char *buffer, size_t *data_length );
|
||||||
|
|
||||||
|
void *vips__mmap( int fd, int writeable, size_t length, gint64 offset );
|
||||||
|
int vips__munmap( void *start, size_t length );
|
||||||
|
int vips_mapfile( VipsImage * );
|
||||||
|
int vips_mapfilerw( VipsImage * );
|
||||||
|
int vips_remapfilerw( VipsImage * );
|
||||||
|
|
||||||
|
void vips__buffer_init( void );
|
||||||
|
|
||||||
void vips__read_4byte( int msb_first, unsigned char *to, unsigned char **from );
|
void vips__read_4byte( int msb_first, unsigned char *to, unsigned char **from );
|
||||||
void vips__read_2byte( int msb_first, unsigned char *to, unsigned char **from );
|
void vips__read_2byte( int msb_first, unsigned char *to, unsigned char **from );
|
||||||
void vips__write_4byte( unsigned char **to, unsigned char *from );
|
void vips__write_4byte( unsigned char **to, unsigned char *from );
|
||||||
@ -94,12 +108,9 @@ int vips__writehist( VipsImage *image );
|
|||||||
int vips__read_header_bytes( VipsImage *im, unsigned char *from );
|
int vips__read_header_bytes( VipsImage *im, unsigned char *from );
|
||||||
int vips__write_header_bytes( VipsImage *im, unsigned char *to );
|
int vips__write_header_bytes( VipsImage *im, unsigned char *to );
|
||||||
|
|
||||||
int im__ftruncate( int fd, gint64 pos );
|
extern GMutex *vips__global_lock;
|
||||||
int im__seek( int fd, gint64 pos );
|
|
||||||
|
|
||||||
int im__open_image_file( const char * );
|
|
||||||
void im__format_init( void );
|
void im__format_init( void );
|
||||||
void im__type_init( void );
|
|
||||||
|
|
||||||
void im__tiff_register( void );
|
void im__tiff_register( void );
|
||||||
void im__jpeg_register( void );
|
void im__jpeg_register( void );
|
||||||
@ -110,9 +121,6 @@ void im__analyze_register( void );
|
|||||||
void im__exr_register( void );
|
void im__exr_register( void );
|
||||||
void im__magick_register( void );
|
void im__magick_register( void );
|
||||||
|
|
||||||
extern int im__read_test;
|
|
||||||
extern GMutex *vips__global_lock;
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
IM__RGB, /* 1 or 3 bands (eg. PPM) */
|
IM__RGB, /* 1 or 3 bands (eg. PPM) */
|
||||||
IM__RGBA, /* 1, 2, 3 or 4 bands (eg. PNG) */
|
IM__RGBA, /* 1, 2, 3 or 4 bands (eg. PNG) */
|
||||||
@ -123,17 +131,6 @@ typedef enum {
|
|||||||
VipsImage *im__convert_saveable( VipsImage *in,
|
VipsImage *im__convert_saveable( VipsImage *in,
|
||||||
im__saveable_t saveable, int format_table[10] );
|
im__saveable_t saveable, int format_table[10] );
|
||||||
|
|
||||||
void vips__link_break_all( VipsImage *im );
|
|
||||||
void *vips__link_map( VipsImage *im, VipsSListMap2Fn fn, void *a, void *b );
|
|
||||||
|
|
||||||
GValue *im__gvalue_ref_string_new( const char *text );
|
|
||||||
void im__gslist_gvalue_free( GSList *list );
|
|
||||||
GSList *im__gslist_gvalue_copy( const GSList *list );
|
|
||||||
GSList *im__gslist_gvalue_merge( GSList *a, const GSList *b );
|
|
||||||
char *im__gslist_gvalue_get( const GSList *list );
|
|
||||||
|
|
||||||
void vips__buffer_init( void );
|
|
||||||
|
|
||||||
int im__bandup( const char *domain, VipsImage *in, VipsImage *out, int n );
|
int im__bandup( const char *domain, VipsImage *in, VipsImage *out, int n );
|
||||||
int im__bandalike_vec( const char *domain, VipsImage **in, VipsImage **out, int n );
|
int im__bandalike_vec( const char *domain, VipsImage **in, VipsImage **out, int n );
|
||||||
int im__bandalike( const char *domain,
|
int im__bandalike( const char *domain,
|
||||||
@ -184,20 +181,9 @@ struct im_col_tab_disp *im_col_make_tables_RGB( VipsImage *im,
|
|||||||
struct im_col_display *d );
|
struct im_col_display *d );
|
||||||
struct im_col_tab_disp *im_col_display_get_table( struct im_col_display *d );
|
struct im_col_tab_disp *im_col_display_get_table( struct im_col_display *d );
|
||||||
|
|
||||||
char *vips__b64_encode( const unsigned char *data, size_t data_length );
|
|
||||||
unsigned char *vips__b64_decode( const char *buffer, size_t *data_length );
|
|
||||||
|
|
||||||
void *vips__mmap( int fd, int writeable, size_t length, gint64 offset );
|
|
||||||
int vips__munmap( void *start, size_t length );
|
|
||||||
int vips_mapfile( VipsImage * );
|
|
||||||
int vips_mapfilerw( VipsImage * );
|
|
||||||
int vips_remapfilerw( VipsImage * );
|
|
||||||
|
|
||||||
int im__write( int, const void *, size_t );
|
|
||||||
int im__trigger_callbacks( GSList *cblist );
|
|
||||||
int im__close( VipsImage * );
|
|
||||||
int im__fft_sp( float *rvec, float *ivec, int logrows, int logcols );
|
int im__fft_sp( float *rvec, float *ivec, int logrows, int logcols );
|
||||||
int im__fftproc( VipsImage *dummy, VipsImage *in, VipsImage *out, im__fftproc_fn fn );
|
int im__fftproc( VipsImage *dummy, VipsImage *in, VipsImage *out, im__fftproc_fn fn );
|
||||||
|
|
||||||
int im__find_lroverlap( VipsImage *ref_in, VipsImage *sec_in, VipsImage *out,
|
int im__find_lroverlap( VipsImage *ref_in, VipsImage *sec_in, VipsImage *out,
|
||||||
int bandno_in,
|
int bandno_in,
|
||||||
int xref, int yref, int xsec, int ysec,
|
int xref, int yref, int xsec, int ysec,
|
||||||
@ -276,4 +262,4 @@ void vips__interpolate_init( void );
|
|||||||
}
|
}
|
||||||
#endif /*__cplusplus*/
|
#endif /*__cplusplus*/
|
||||||
|
|
||||||
#endif /*IM_INTERNAL_H*/
|
#endif /*VIPS_INTERNAL_H*/
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/* i18n stuff for vips.
|
/* i18n stuff for vips.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef IM_VIPS_INTL_H
|
#ifndef VIPS_INTL_H
|
||||||
#define IM_VIPS_INTL_H
|
#define VIPS_INTL_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -47,4 +47,4 @@ const char *vips__ngettext( const char *msgid,
|
|||||||
}
|
}
|
||||||
#endif /*__cplusplus*/
|
#endif /*__cplusplus*/
|
||||||
|
|
||||||
#endif /* IM_VIPS_INTL_H */
|
#endif /* VIPS_INTL_H */
|
||||||
|
@ -32,28 +32,28 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef IM_PRIVATE_H
|
#ifndef VIPS_PRIVATE_H
|
||||||
#define IM_PRIVATE_H
|
#define VIPS_PRIVATE_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /*__cplusplus*/
|
#endif /*__cplusplus*/
|
||||||
|
|
||||||
#define IM_SPARE (8)
|
#define VIPS_SPARE (8)
|
||||||
|
|
||||||
/* Private to iofuncs: the minimum number of scanlines we add above and below
|
/* Private to iofuncs: the minimum number of scanlines we add above and below
|
||||||
* the window as a margin for slop.
|
* the window as a margin for slop.
|
||||||
*/
|
*/
|
||||||
#define IM__WINDOW_MARGIN_PIXELS (128)
|
#define VIPS__WINDOW_MARGIN_PIXELS (128)
|
||||||
|
|
||||||
/* Private to iofuncs: add at least this many bytes above and below the window.
|
/* 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.
|
* There's no point mapping just a few KB of a small image.
|
||||||
*/
|
*/
|
||||||
#define IM__WINDOW_MARGIN_BYTES (1024 * 1024 * 10)
|
#define VIPS__WINDOW_MARGIN_BYTES (1024 * 1024 * 10)
|
||||||
|
|
||||||
/* sizeof() a VIPS header on disc.
|
/* sizeof() a VIPS header on disc.
|
||||||
*/
|
*/
|
||||||
#define IM_SIZEOF_HEADER (64)
|
#define VIPS_SIZEOF_HEADER (64)
|
||||||
|
|
||||||
typedef unsigned char PEL; /* useful datum */
|
typedef unsigned char PEL; /* useful datum */
|
||||||
|
|
||||||
@ -132,16 +132,17 @@ typedef enum region_type {
|
|||||||
VIPS_REGION_WINDOW /* mmap() buffer on fd on another image */
|
VIPS_REGION_WINDOW /* mmap() buffer on fd on another image */
|
||||||
} RegionType;
|
} RegionType;
|
||||||
|
|
||||||
/* Private to iofuncs: the size of the `tiles' requested by im_generate()
|
/* Private to iofuncs: the size of the `tiles' requested by
|
||||||
|
* vips_image_generate()
|
||||||
* when acting as a data sink.
|
* when acting as a data sink.
|
||||||
*/
|
*/
|
||||||
#define IM__TILE_WIDTH (64)
|
#define VIPS__TILE_WIDTH (64)
|
||||||
#define IM__TILE_HEIGHT (64)
|
#define VIPS__TILE_HEIGHT (64)
|
||||||
|
|
||||||
/* The height of the strips for the other two request styles.
|
/* The height of the strips for the other two request styles.
|
||||||
*/
|
*/
|
||||||
#define IM__THINSTRIP_HEIGHT (1)
|
#define VIPS__THINSTRIP_HEIGHT (1)
|
||||||
#define IM__FATSTRIP_HEIGHT (16)
|
#define VIPS__FATSTRIP_HEIGHT (16)
|
||||||
|
|
||||||
/* Functions on regions.
|
/* Functions on regions.
|
||||||
*/
|
*/
|
||||||
@ -150,8 +151,6 @@ void vips__region_take_ownership( struct _VipsRegion *reg );
|
|||||||
void vips__region_check_ownership( struct _VipsRegion *reg );
|
void vips__region_check_ownership( struct _VipsRegion *reg );
|
||||||
void vips__region_no_ownership( struct _VipsRegion *reg );
|
void vips__region_no_ownership( struct _VipsRegion *reg );
|
||||||
|
|
||||||
void im__find_demand_size( struct _VipsImage *im, int *pw, int *ph );
|
|
||||||
|
|
||||||
int vips__region_start( struct _VipsRegion *reg );
|
int vips__region_start( struct _VipsRegion *reg );
|
||||||
void vips__region_stop( struct _VipsRegion *reg );
|
void vips__region_stop( struct _VipsRegion *reg );
|
||||||
|
|
||||||
@ -167,4 +166,4 @@ int vips__image_write_prepare( struct _VipsImage *image );
|
|||||||
}
|
}
|
||||||
#endif /*__cplusplus*/
|
#endif /*__cplusplus*/
|
||||||
|
|
||||||
#endif /*IM_PRIVATE_H*/
|
#endif /*VIPS_PRIVATE_H*/
|
||||||
|
@ -32,8 +32,8 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef IM_REGION_H
|
#ifndef VIPS_REGION_H
|
||||||
#define IM_REGION_H
|
#define VIPS_REGION_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -65,7 +65,7 @@ typedef struct _VipsRegion {
|
|||||||
VipsImage *im; /* Link back to parent image */
|
VipsImage *im; /* Link back to parent image */
|
||||||
VipsRect valid; /* Area of parent we can see */
|
VipsRect valid; /* Area of parent we can see */
|
||||||
|
|
||||||
/* The rest of REGION is private.
|
/* The rest of VipsRegion is private.
|
||||||
*/
|
*/
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
RegionType type; /* What kind of attachment */
|
RegionType type; /* What kind of attachment */
|
||||||
@ -118,7 +118,7 @@ int vips_region_prepare_to( VipsRegion *reg,
|
|||||||
VipsRegion *dest, VipsRect *r, int x, int y );
|
VipsRegion *dest, VipsRect *r, int x, int y );
|
||||||
int vips_region_prepare_many( VipsRegion **reg, VipsRect *r );
|
int vips_region_prepare_many( VipsRegion **reg, VipsRect *r );
|
||||||
|
|
||||||
/* Macros on REGIONs.
|
/* Macros on VipsRegion.
|
||||||
* VIPS_REGION_LSKIP() add to move down line
|
* VIPS_REGION_LSKIP() add to move down line
|
||||||
* VIPS_REGION_N_ELEMENTS() number of elements across region
|
* VIPS_REGION_N_ELEMENTS() number of elements across region
|
||||||
* VIPS_REGION_SIZEOF_LINE() sizeof width of region
|
* VIPS_REGION_SIZEOF_LINE() sizeof width of region
|
||||||
@ -135,7 +135,7 @@ int vips_region_prepare_many( VipsRegion **reg, VipsRect *r );
|
|||||||
*/
|
*/
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
#define VIPS_REGION_ADDR( R, X, Y ) \
|
#define VIPS_REGION_ADDR( R, X, Y ) \
|
||||||
( (im_rect_includespoint( &(R)->valid, (X), (Y) ))? \
|
( (vips_rect_includespoint( &(R)->valid, (X), (Y) ))? \
|
||||||
((R)->data + ((Y) - (R)->valid.top) * VIPS_REGION_LSKIP(R) + \
|
((R)->data + ((Y) - (R)->valid.top) * VIPS_REGION_LSKIP(R) + \
|
||||||
((X) - (R)->valid.left) * VIPS_IMAGE_SIZEOF_PEL((R)->im)): \
|
((X) - (R)->valid.left) * VIPS_IMAGE_SIZEOF_PEL((R)->im)): \
|
||||||
(fprintf( stderr, \
|
(fprintf( stderr, \
|
||||||
@ -164,4 +164,4 @@ int vips_region_prepare_many( VipsRegion **reg, VipsRect *r );
|
|||||||
}
|
}
|
||||||
#endif /*__cplusplus*/
|
#endif /*__cplusplus*/
|
||||||
|
|
||||||
#endif /*IM_REGION_H*/
|
#endif /*VIPS_REGION_H*/
|
||||||
|
@ -33,8 +33,8 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef IM_SEMAPHORE_H
|
#ifndef VIPS_SEMAPHORE_H
|
||||||
#define IM_SEMAPHORE_H
|
#define VIPS_SEMAPHORE_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -61,4 +61,4 @@ void vips_semaphore_init( VipsSemaphore *s, int v, char *name );
|
|||||||
}
|
}
|
||||||
#endif /*__cplusplus*/
|
#endif /*__cplusplus*/
|
||||||
|
|
||||||
#endif /*IM_SEMAPHORE_H*/
|
#endif /*VIPS_SEMAPHORE_H*/
|
||||||
|
@ -28,8 +28,8 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef IM_THREAD_H
|
#ifndef VIPS_THREAD_H
|
||||||
#define IM_THREAD_H
|
#define VIPS_THREAD_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -41,25 +41,25 @@ extern "C" {
|
|||||||
FIXME ... should have an environment variable for this?
|
FIXME ... should have an environment variable for this?
|
||||||
|
|
||||||
*/
|
*/
|
||||||
#define IM__DEFAULT_STACK_SIZE (2 * 1024 * 1024)
|
#define VIPS__DEFAULT_STACK_SIZE (2 * 1024 * 1024)
|
||||||
|
|
||||||
#ifndef HAVE_THREADS
|
#ifndef HAVE_THREADS
|
||||||
#undef g_thread_supported
|
#undef g_thread_supported
|
||||||
#define g_thread_supported() (0)
|
#define g_thread_supported() (0)
|
||||||
|
|
||||||
#define g_thread_init im__g_thread_init
|
#define g_thread_init vips__g_thread_init
|
||||||
#define g_thread_join im__g_thread_join
|
#define g_thread_join vips__g_thread_join
|
||||||
#define g_thread_self im__g_thread_self
|
#define g_thread_self vips__g_thread_self
|
||||||
#define g_thread_create_full im__g_thread_create_full
|
#define g_thread_create_full vips__g_thread_create_full
|
||||||
|
|
||||||
/* We don't need a shadow imlementation of g_thread_create(), even though we
|
/* We don't need a shadow imlementation of g_thread_create(), even though we
|
||||||
* use it, because it's just a macro over g_thread_create_full().
|
* use it, because it's just a macro over g_thread_create_full().
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void im__g_thread_init( GThreadFunctions *vtable );
|
void vips__g_thread_init( GThreadFunctions *vtable );
|
||||||
gpointer im__g_thread_join( GThread * );
|
gpointer vips__g_thread_join( GThread * );
|
||||||
gpointer im__g_thread_self( void );
|
gpointer vips__g_thread_self( void );
|
||||||
GThread *im__g_thread_create_full( GThreadFunc,
|
GThread *vips__g_thread_create_full( GThreadFunc,
|
||||||
gpointer, gulong, gboolean, gboolean, GThreadPriority, GError ** );
|
gpointer, gulong, gboolean, gboolean, GThreadPriority, GError ** );
|
||||||
|
|
||||||
#undef g_mutex_new
|
#undef g_mutex_new
|
||||||
@ -67,19 +67,19 @@ GThread *im__g_thread_create_full( GThreadFunc,
|
|||||||
#undef g_mutex_lock
|
#undef g_mutex_lock
|
||||||
#undef g_mutex_unlock
|
#undef g_mutex_unlock
|
||||||
|
|
||||||
#define g_mutex_new im__g_mutex_new
|
#define g_mutex_new vips__g_mutex_new
|
||||||
#define g_mutex_free im__g_mutex_free
|
#define g_mutex_free vips__g_mutex_free
|
||||||
#define g_mutex_lock im__g_mutex_lock
|
#define g_mutex_lock vips__g_mutex_lock
|
||||||
#define g_mutex_unlock im__g_mutex_unlock
|
#define g_mutex_unlock vips__g_mutex_unlock
|
||||||
|
|
||||||
GMutex *im__g_mutex_new( void );
|
GMutex *vips__g_mutex_new( void );
|
||||||
void im__g_mutex_free( GMutex * );
|
void vips__g_mutex_free( GMutex * );
|
||||||
void im__g_mutex_lock( GMutex * );
|
void vips__g_mutex_lock( GMutex * );
|
||||||
void im__g_mutex_unlock( GMutex * );
|
void vips__g_mutex_unlock( GMutex * );
|
||||||
#endif /*!HAVE_THREADS*/
|
#endif /*!HAVE_THREADS*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /*__cplusplus*/
|
#endif /*__cplusplus*/
|
||||||
|
|
||||||
#endif /*IM_THREAD_H*/
|
#endif /*VIPS_THREAD_H*/
|
||||||
|
@ -33,8 +33,8 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef IM_THREADPOOL_H
|
#ifndef VIPS_THREADPOOL_H
|
||||||
#define IM_THREADPOOL_H
|
#define VIPS_THREADPOOL_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -152,11 +152,11 @@ int vips_sink_memory( VipsImage *im );
|
|||||||
|
|
||||||
void vips__print_renders( void );
|
void vips__print_renders( void );
|
||||||
|
|
||||||
void im_concurrency_set( int concurrency );
|
void vips_concurrency_set( int concurrency );
|
||||||
int im_concurrency_get( void );
|
int vips_concurrency_get( void );
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /*__cplusplus*/
|
#endif /*__cplusplus*/
|
||||||
|
|
||||||
#endif /*IM_THREADPOOL_H*/
|
#endif /*VIPS_THREADPOOL_H*/
|
||||||
|
@ -30,8 +30,8 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef IM_VECTOR_H
|
#ifndef VIPS_VECTOR_H
|
||||||
#define IM_VECTOR_H
|
#define VIPS_VECTOR_H
|
||||||
|
|
||||||
#ifdef HAVE_ORC
|
#ifdef HAVE_ORC
|
||||||
#include <orc/orc.h>
|
#include <orc/orc.h>
|
||||||
@ -135,4 +135,4 @@ void vips_executor_run( VipsExecutor *executor );
|
|||||||
}
|
}
|
||||||
#endif /*__cplusplus*/
|
#endif /*__cplusplus*/
|
||||||
|
|
||||||
#endif /*IM_VECTOR_H*/
|
#endif /*VIPS_VECTOR_H*/
|
||||||
|
@ -1,15 +1,13 @@
|
|||||||
/* Macros for the header version.
|
/* Macros for the header version.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef IM_VERSION_H
|
#ifndef VIPS_VERSION_H
|
||||||
#define IM_VERSION_H
|
#define VIPS_VERSION_H
|
||||||
|
|
||||||
#define IM_VERSION "@IM_VERSION@"
|
#define VIPS_VERSION "@VIPS_VERSION@"
|
||||||
#define IM_VERSION_STRING "@IM_VERSION_STRING@"
|
#define VIPS_VERSION_STRING "@VIPS_VERSION_STRING@"
|
||||||
#define IM_MAJOR_VERSION (@IM_MAJOR_VERSION@)
|
#define VIPS_MAJOR_VERSION (@VIPS_MAJOR_VERSION@)
|
||||||
#define IM_MINOR_VERSION (@IM_MINOR_VERSION@)
|
#define VIPS_MINOR_VERSION (@VIPS_MINOR_VERSION@)
|
||||||
#define IM_MICRO_VERSION (@IM_MICRO_VERSION@)
|
#define VIPS_MICRO_VERSION (@VIPS_MICRO_VERSION@)
|
||||||
#define IM_INTERFACE_AGE (@IM_INTERFACE_AGE@)
|
|
||||||
#define IM_BINARY_AGE (@IM_BINARY_AGE@)
|
|
||||||
|
|
||||||
#endif /*IM_VERSION_H*/
|
#endif /*VIPS_VERSION_H*/
|
||||||
|
@ -473,6 +473,18 @@ int im_wrapmany( VipsImage **in, VipsImage *out,
|
|||||||
#define im_amiMSBfirst vips_amiMSBfirst
|
#define im_amiMSBfirst vips_amiMSBfirst
|
||||||
#define im__temp_name vips__temp_name
|
#define im__temp_name vips__temp_name
|
||||||
|
|
||||||
|
#define IM_VERSION_STRING VIPS_VERSION_STRING
|
||||||
|
#define IM_MAJOR_VERSION VIPS_MAJOR_VERSION
|
||||||
|
#define IM_MINOR_VERSION VIPS_MINOR_VERSION
|
||||||
|
#define IM_MICRO_VERSION VIPS_MICRO_VERSION
|
||||||
|
|
||||||
|
#define IM_EXEEXT VIPS_EXEEXT
|
||||||
|
|
||||||
|
#define IM_SIZEOF_HEADER VIPS_SIZEOF_HEADER
|
||||||
|
|
||||||
|
#define im_concurrency_set vips_concurrency_set
|
||||||
|
#define im_concurrency_get vips_concurrency_get
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /*__cplusplus*/
|
#endif /*__cplusplus*/
|
||||||
|
@ -93,13 +93,13 @@
|
|||||||
* |[
|
* |[
|
||||||
* IMAGE *im;
|
* IMAGE *im;
|
||||||
*
|
*
|
||||||
* if( !(im = im_open( filename, "r" )) )
|
* if( !(im = vips_image_new_from_file( filename, "r" )) )
|
||||||
* // im_open will set a mmessage, we don't need to
|
* // vips_image_new_from_file() will set a mmessage, we don't need to
|
||||||
* return( -1 );
|
* return( -1 );
|
||||||
*
|
*
|
||||||
* if( im->Xsize < 100 ) {
|
* if( vips_image_get_width( im ) < 100 ) {
|
||||||
* // we have detected an error, we must set a message
|
* // we have detected an error, we must set a message
|
||||||
* vips_error( "myprogram", "%s", _( "XSize too small" ) );
|
* vips_error( "myprogram", "%s", _( "width too small" ) );
|
||||||
* return( -1 );
|
* return( -1 );
|
||||||
* }
|
* }
|
||||||
* ]|
|
* ]|
|
||||||
@ -110,8 +110,8 @@
|
|||||||
|
|
||||||
/* Make global array to keep the error message buffer.
|
/* Make global array to keep the error message buffer.
|
||||||
*/
|
*/
|
||||||
#define IM_MAX_ERROR (10240)
|
#define VIPS_MAX_ERROR (10240)
|
||||||
static char vips_error_text[IM_MAX_ERROR] = "";
|
static char vips_error_text[VIPS_MAX_ERROR] = "";
|
||||||
static VipsBuf vips_error_buf = VIPS_BUF_STATIC( vips_error_text );
|
static VipsBuf vips_error_buf = VIPS_BUF_STATIC( vips_error_text );
|
||||||
|
|
||||||
#define IM_DIAGNOSTICS "IM_DIAGNOSTICS"
|
#define IM_DIAGNOSTICS "IM_DIAGNOSTICS"
|
||||||
@ -211,7 +211,7 @@ vips_verror_system( int err, const char *domain, const char *fmt, va_list ap )
|
|||||||
err,
|
err,
|
||||||
MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ),
|
MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ),
|
||||||
(LPSTR) &buf, 0, NULL ) ) {
|
(LPSTR) &buf, 0, NULL ) ) {
|
||||||
im_error( _( "windows error" ), "%s", buf );
|
vips_error( _( "windows error" ), "%s", buf );
|
||||||
LocalFree( buf );
|
LocalFree( buf );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -270,7 +270,7 @@ vips_demand_hint_array( VipsImage *image, VipsDemandStyle hint, VipsImage **in )
|
|||||||
int i, len, nany;
|
int i, len, nany;
|
||||||
VipsDemandStyle set_hint;
|
VipsDemandStyle set_hint;
|
||||||
|
|
||||||
/* How many input images are there? And how many are IM_ANY?
|
/* How many input images are there? And how many are ANY?
|
||||||
*/
|
*/
|
||||||
for( i = 0, len = 0, nany = 0; in[i]; i++, len++ )
|
for( i = 0, len = 0, nany = 0; in[i]; i++, len++ )
|
||||||
if( in[i]->dhint == VIPS_DEMAND_STYLE_ANY )
|
if( in[i]->dhint == VIPS_DEMAND_STYLE_ANY )
|
||||||
@ -285,8 +285,8 @@ vips_demand_hint_array( VipsImage *image, VipsDemandStyle hint, VipsImage **in )
|
|||||||
*/
|
*/
|
||||||
;
|
;
|
||||||
else if( nany == len )
|
else if( nany == len )
|
||||||
/* Special case: if all the inputs are IM_ANY, then output can
|
/* Special case: if all the inputs are ANY, then output can
|
||||||
* be IM_ANY regardless of what this function wants.
|
* be ANY regardless of what this function wants.
|
||||||
*/
|
*/
|
||||||
set_hint = VIPS_DEMAND_STYLE_ANY;
|
set_hint = VIPS_DEMAND_STYLE_ANY;
|
||||||
else
|
else
|
||||||
|
@ -88,7 +88,7 @@
|
|||||||
* @VIPS_DEMAND_STYLE_THINSTRIP: demand in thin (typically 1 pixel high) strips
|
* @VIPS_DEMAND_STYLE_THINSTRIP: demand in thin (typically 1 pixel high) strips
|
||||||
* @VIPS_DEMAND_STYLE_ANY: demand geometry does not matter
|
* @VIPS_DEMAND_STYLE_ANY: demand geometry does not matter
|
||||||
*
|
*
|
||||||
* See im_demand_hint(). Operations can hint to the VIPS image IO system about
|
* See vips_demand_hint(). Operations can hint to the VIPS image IO system about
|
||||||
* the kind of demand geometry they prefer.
|
* the kind of demand geometry they prefer.
|
||||||
*
|
*
|
||||||
* These demand styles are given below in order of increasing
|
* These demand styles are given below in order of increasing
|
||||||
@ -191,7 +191,7 @@
|
|||||||
* @start: Start time
|
* @start: Start time
|
||||||
*
|
*
|
||||||
* A structure available to eval callbacks giving information on evaluation
|
* A structure available to eval callbacks giving information on evaluation
|
||||||
* progress. See im_add_eval_callback().
|
* progress. See #VipsImage::eval.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -319,12 +319,12 @@ enum {
|
|||||||
|
|
||||||
/* Progress feedback. Only really useful for testing, tbh.
|
/* Progress feedback. Only really useful for testing, tbh.
|
||||||
*/
|
*/
|
||||||
int im__progress = 0;
|
int vips__progress = 0;
|
||||||
|
|
||||||
/* A string giving the image size (in bytes of uncompressed image) above which
|
/* A string giving the image size (in bytes of uncompressed image) above which
|
||||||
* we decompress to disc on open. Can be eg. "12m" for 12 megabytes.
|
* we decompress to disc on open. Can be eg. "12m" for 12 megabytes.
|
||||||
*/
|
*/
|
||||||
char *im__disc_threshold = NULL;
|
char *vips__disc_threshold = NULL;
|
||||||
|
|
||||||
static guint vips_image_signals[SIG_LAST] = { 0 };
|
static guint vips_image_signals[SIG_LAST] = { 0 };
|
||||||
|
|
||||||
@ -490,19 +490,19 @@ vips_image_print( VipsObject *object, VipsBuf *buf )
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
vips_image_sanity_upstream( VipsImage *im_up, VipsImage *im_down )
|
vips_image_sanity_upstream( VipsImage *up, VipsImage *down )
|
||||||
{
|
{
|
||||||
if( !g_slist_find( im_up->downstream, im_down ) ||
|
if( !g_slist_find( up->downstream, down ) ||
|
||||||
!g_slist_find( im_down->upstream, im_up ) )
|
!g_slist_find( down->upstream, up ) )
|
||||||
return( im_up );
|
return( up );
|
||||||
|
|
||||||
return( NULL );
|
return( NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
vips_image_sanity_downstream( VipsImage *im_down, VipsImage *im_up )
|
vips_image_sanity_downstream( VipsImage *down, VipsImage *up )
|
||||||
{
|
{
|
||||||
return( vips_image_sanity_upstream( im_up, im_down ) );
|
return( vips_image_sanity_upstream( up, down ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -676,8 +676,8 @@ disc_threshold( void )
|
|||||||
if( (env = g_getenv( "IM_DISC_THRESHOLD" )) )
|
if( (env = g_getenv( "IM_DISC_THRESHOLD" )) )
|
||||||
threshold = parse_size( env );
|
threshold = parse_size( env );
|
||||||
|
|
||||||
if( im__disc_threshold )
|
if( vips__disc_threshold )
|
||||||
threshold = parse_size( im__disc_threshold );
|
threshold = parse_size( vips__disc_threshold );
|
||||||
|
|
||||||
VIPS_DEBUG_MSG( "disc_threshold: %zd bytes\n", threshold );
|
VIPS_DEBUG_MSG( "disc_threshold: %zd bytes\n", threshold );
|
||||||
}
|
}
|
||||||
@ -845,7 +845,7 @@ vips_image_preeval_cb( VipsImage *image, VipsProgress *progress, int *last )
|
|||||||
&tile_width, &tile_height, &nlines );
|
&tile_width, &tile_height, &nlines );
|
||||||
printf( _( "%s %s: %d threads, %d x %d tiles, groups of %d scanlines" ),
|
printf( _( "%s %s: %d threads, %d x %d tiles, groups of %d scanlines" ),
|
||||||
g_get_prgname(), image->filename,
|
g_get_prgname(), image->filename,
|
||||||
im_concurrency_get(),
|
vips_concurrency_get(),
|
||||||
tile_width, tile_height, nlines );
|
tile_width, tile_height, nlines );
|
||||||
printf( "\n" );
|
printf( "\n" );
|
||||||
|
|
||||||
@ -884,7 +884,7 @@ vips_image_posteval_cb( VipsImage *image, VipsProgress *progress )
|
|||||||
static void
|
static void
|
||||||
vips_image_add_progress( VipsImage *image )
|
vips_image_add_progress( VipsImage *image )
|
||||||
{
|
{
|
||||||
if( im__progress ||
|
if( vips__progress ||
|
||||||
g_getenv( "IM_PROGRESS" ) ) {
|
g_getenv( "IM_PROGRESS" ) ) {
|
||||||
|
|
||||||
/* Keep the %complete we displayed last time here.
|
/* Keep the %complete we displayed last time here.
|
||||||
@ -1079,7 +1079,7 @@ vips_image_class_init( VipsImageClass *class )
|
|||||||
GParamSpec *pspec;
|
GParamSpec *pspec;
|
||||||
|
|
||||||
/* Pass in a nonsense name for argv0 ... this init world is only here
|
/* Pass in a nonsense name for argv0 ... this init world is only here
|
||||||
* for old programs which are missing an im_init_world() call. We must
|
* for old programs which are missing an vips_init() call. We must
|
||||||
* have threads set up before we can process.
|
* have threads set up before we can process.
|
||||||
*/
|
*/
|
||||||
if( vips_init( "vips" ) )
|
if( vips_init( "vips" ) )
|
||||||
@ -1177,7 +1177,7 @@ vips_image_class_init( VipsImageClass *class )
|
|||||||
|
|
||||||
pspec = g_param_spec_int( "sizeof_header", "Size of header",
|
pspec = g_param_spec_int( "sizeof_header", "Size of header",
|
||||||
_( "Offset in bytes from start of file" ),
|
_( "Offset in bytes from start of file" ),
|
||||||
0, 1000000, IM_SIZEOF_HEADER,
|
0, 1000000, VIPS_SIZEOF_HEADER,
|
||||||
G_PARAM_READWRITE );
|
G_PARAM_READWRITE );
|
||||||
g_object_class_install_property( gobject_class,
|
g_object_class_install_property( gobject_class,
|
||||||
PROP_SIZEOF_HEADER, pspec );
|
PROP_SIZEOF_HEADER, pspec );
|
||||||
@ -1253,7 +1253,7 @@ vips_image_init( VipsImage *image )
|
|||||||
image->fd = -1; /* since 0 is stdout */
|
image->fd = -1; /* since 0 is stdout */
|
||||||
image->sslock = g_mutex_new();
|
image->sslock = g_mutex_new();
|
||||||
|
|
||||||
image->sizeof_header = IM_SIZEOF_HEADER;
|
image->sizeof_header = VIPS_SIZEOF_HEADER;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -1661,9 +1661,9 @@ vips_image_new_from_file_raw( const char *filename,
|
|||||||
*
|
*
|
||||||
* This function wraps an #IMAGE around a memory buffer. VIPS does not take
|
* This function wraps an #IMAGE around a memory buffer. VIPS does not take
|
||||||
* responsibility for the area of memory, it's up to you to make sure it's
|
* responsibility for the area of memory, it's up to you to make sure it's
|
||||||
* freed when the image is closed. See for example im_add_close_callback().
|
* freed when the image is closed. See for example #VipsObject::close.
|
||||||
*
|
*
|
||||||
* See also: im_binfile(), im_raw2vips(), im_open().
|
* See also: im_binfile(), im_raw2vips(), vips_image_new().
|
||||||
*
|
*
|
||||||
* Returns: the new #VipsImage, or %NULL on error.
|
* Returns: the new #VipsImage, or %NULL on error.
|
||||||
*/
|
*/
|
||||||
@ -1706,9 +1706,9 @@ vips_image_new_temp_cb( VipsImage *image )
|
|||||||
* Make a "w" disc #VipsImage which will be automatically unlinked when it is
|
* Make a "w" disc #VipsImage which will be automatically unlinked when it is
|
||||||
* destroyed. @format is something like "%s.v" for a vips file.
|
* destroyed. @format is something like "%s.v" for a vips file.
|
||||||
*
|
*
|
||||||
* The file is created in the temporary directory, see im__temp_name().
|
* The file is created in the temporary directory, see vips__temp_name().
|
||||||
*
|
*
|
||||||
* See also: im__temp_name().
|
* See also: vips__temp_name().
|
||||||
*
|
*
|
||||||
* Returns: the new #VipsImage, or %NULL on error.
|
* Returns: the new #VipsImage, or %NULL on error.
|
||||||
*/
|
*/
|
||||||
@ -1808,8 +1808,8 @@ vips_image_new_array( VipsImage *parent, VipsImage **images, int n )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Get the image ready for writing. This can get called many
|
/* Get the image ready for writing. This can get called many
|
||||||
* times. Used by vips_image_generate() and vips_image_write_line(). vips7 compat can
|
* times. Used by vips_image_generate() and vips_image_write_line(). vips7
|
||||||
* call this as im_setupout().
|
* compat can call this as im_setupout().
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
vips__image_write_prepare( VipsImage *image )
|
vips__image_write_prepare( VipsImage *image )
|
||||||
@ -1829,8 +1829,6 @@ vips__image_write_prepare( VipsImage *image )
|
|||||||
image->Bbits = vips_format_sizeof( image->BandFmt ) << 3;
|
image->Bbits = vips_format_sizeof( image->BandFmt ) << 3;
|
||||||
|
|
||||||
if( image->dtype == VIPS_IMAGE_PARTIAL ) {
|
if( image->dtype == VIPS_IMAGE_PARTIAL ) {
|
||||||
/* Make it into a im_setbuf() image.
|
|
||||||
*/
|
|
||||||
VIPS_DEBUG_MSG( "vips__image_write_prepare: "
|
VIPS_DEBUG_MSG( "vips__image_write_prepare: "
|
||||||
"old-style output for %s\n", image->filename );
|
"old-style output for %s\n", image->filename );
|
||||||
|
|
||||||
@ -1874,7 +1872,7 @@ vips__image_write_prepare( VipsImage *image )
|
|||||||
*
|
*
|
||||||
* Write a line of pixels to an image. This function must be called repeatedly
|
* Write a line of pixels to an image. This function must be called repeatedly
|
||||||
* with @ypos increasing from 0 to @YSize -
|
* with @ypos increasing from 0 to @YSize -
|
||||||
* @linebuffer must be IM_IMAGE_SIZEOF_LINE() bytes long.
|
* @linebuffer must be VIPS_IMAGE_SIZEOF_LINE() bytes long.
|
||||||
*
|
*
|
||||||
* See also: vips_image_generate().
|
* See also: vips_image_generate().
|
||||||
*
|
*
|
||||||
@ -1904,7 +1902,7 @@ vips_image_write_line( VipsImage *image, int ypos, PEL *linebuffer )
|
|||||||
case VIPS_IMAGE_OPENOUT:
|
case VIPS_IMAGE_OPENOUT:
|
||||||
/* Don't use ypos for this.
|
/* Don't use ypos for this.
|
||||||
*/
|
*/
|
||||||
if( im__write( image->fd, linebuffer, linesize ) )
|
if( vips__write( image->fd, linebuffer, linesize ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -2011,7 +2009,8 @@ vips_image_wio_input( VipsImage *image )
|
|||||||
|
|
||||||
case VIPS_IMAGE_PARTIAL:
|
case VIPS_IMAGE_PARTIAL:
|
||||||
#ifdef DEBUG_IO
|
#ifdef DEBUG_IO
|
||||||
printf( "im_incheck: converting partial image to WIO\n" );
|
printf( "vips_image_wio_input: "
|
||||||
|
"converting partial image to WIO\n" );
|
||||||
#endif/*DEBUG_IO*/
|
#endif/*DEBUG_IO*/
|
||||||
|
|
||||||
/* Change to VIPS_IMAGE_SETBUF. First, make a memory
|
/* Change to VIPS_IMAGE_SETBUF. First, make a memory
|
||||||
@ -2040,7 +2039,8 @@ vips_image_wio_input( VipsImage *image )
|
|||||||
|
|
||||||
case VIPS_IMAGE_OPENIN:
|
case VIPS_IMAGE_OPENIN:
|
||||||
#ifdef DEBUG_IO
|
#ifdef DEBUG_IO
|
||||||
printf( "im_incheck: converting openin image for wio input\n" );
|
printf( "vips_image_wio_input: "
|
||||||
|
"converting openin image for wio input\n" );
|
||||||
#endif/*DEBUG_IO*/
|
#endif/*DEBUG_IO*/
|
||||||
|
|
||||||
/* just mmap() the whole thing.
|
/* just mmap() the whole thing.
|
||||||
@ -2245,7 +2245,8 @@ vips_image_pio_input( VipsImage *image )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
vips_error( "im_pincheck", "%s", _( "image not readable" ) );
|
vips_error( "vips_image_pio_input",
|
||||||
|
"%s", _( "image not readable" ) );
|
||||||
return( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2274,8 +2275,8 @@ vips_image_pio_output( VipsImage *image )
|
|||||||
switch( image->dtype ) {
|
switch( image->dtype ) {
|
||||||
case VIPS_IMAGE_SETBUF:
|
case VIPS_IMAGE_SETBUF:
|
||||||
if( image->data ) {
|
if( image->data ) {
|
||||||
vips_error( "im_poutcheck", "%s",
|
vips_error( "vips_image_pio_output",
|
||||||
_( "image already written" ) );
|
"%s", _( "image already written" ) );
|
||||||
return( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2283,8 +2284,8 @@ vips_image_pio_output( VipsImage *image )
|
|||||||
|
|
||||||
case VIPS_IMAGE_PARTIAL:
|
case VIPS_IMAGE_PARTIAL:
|
||||||
if( image->generate ) {
|
if( image->generate ) {
|
||||||
vips_error( "im_poutcheck", "%s",
|
vips_error( "im_poutcheck",
|
||||||
_( "image already written" ) );
|
"%s", _( "image already written" ) );
|
||||||
return( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -222,7 +222,7 @@ vips_init( const char *argv0 )
|
|||||||
* plugin.
|
* plugin.
|
||||||
*/
|
*/
|
||||||
if( im_load_plugins( "%s/vips-%d.%d",
|
if( im_load_plugins( "%s/vips-%d.%d",
|
||||||
libdir, IM_MAJOR_VERSION, IM_MINOR_VERSION ) ) {
|
libdir, VIPS_MAJOR_VERSION, VIPS_MINOR_VERSION ) ) {
|
||||||
vips_warn( "vips_init", "%s", vips_error_buffer() );
|
vips_warn( "vips_init", "%s", vips_error_buffer() );
|
||||||
vips_error_clear();
|
vips_error_clear();
|
||||||
}
|
}
|
||||||
@ -271,22 +271,22 @@ vips__ngettext( const char *msgid, const char *plural, unsigned long int n )
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GOptionEntry option_entries[] = {
|
static GOptionEntry option_entries[] = {
|
||||||
{ "vips-concurrency", 'c', 0, G_OPTION_ARG_INT, &im__concurrency,
|
{ "vips-concurrency", 'c', 0, G_OPTION_ARG_INT, &vips__concurrency,
|
||||||
N_( "evaluate with N concurrent threads" ), "N" },
|
N_( "evaluate with N concurrent threads" ), "N" },
|
||||||
{ "vips-tile-width", 'w', 0, G_OPTION_ARG_INT, &im__tile_width,
|
{ "vips-tile-width", 'w', 0, G_OPTION_ARG_INT, &vips__tile_width,
|
||||||
N_( "set tile width to N (DEBUG)" ), "N" },
|
N_( "set tile width to N (DEBUG)" ), "N" },
|
||||||
{ "vips-tile-height", 'h', 0, G_OPTION_ARG_INT, &im__tile_height,
|
{ "vips-tile-height", 'h', 0, G_OPTION_ARG_INT, &vips__tile_height,
|
||||||
N_( "set tile height to N (DEBUG)" ), "N" },
|
N_( "set tile height to N (DEBUG)" ), "N" },
|
||||||
{ "vips-thinstrip-height", 't', 0,
|
{ "vips-thinstrip-height", 't', 0,
|
||||||
G_OPTION_ARG_INT, &im__thinstrip_height,
|
G_OPTION_ARG_INT, &vips__thinstrip_height,
|
||||||
N_( "set thinstrip height to N (DEBUG)" ), "N" },
|
N_( "set thinstrip height to N (DEBUG)" ), "N" },
|
||||||
{ "vips-fatstrip-height", 'f', 0,
|
{ "vips-fatstrip-height", 'f', 0,
|
||||||
G_OPTION_ARG_INT, &im__fatstrip_height,
|
G_OPTION_ARG_INT, &vips__fatstrip_height,
|
||||||
N_( "set fatstrip height to N (DEBUG)" ), "N" },
|
N_( "set fatstrip height to N (DEBUG)" ), "N" },
|
||||||
{ "vips-progress", 'p', 0, G_OPTION_ARG_NONE, &im__progress,
|
{ "vips-progress", 'p', 0, G_OPTION_ARG_NONE, &vips__progress,
|
||||||
N_( "show progress feedback" ), NULL },
|
N_( "show progress feedback" ), NULL },
|
||||||
{ "vips-disc-threshold", 'd', 0, G_OPTION_ARG_STRING,
|
{ "vips-disc-threshold", 'd', 0, G_OPTION_ARG_STRING,
|
||||||
&im__disc_threshold,
|
&vips__disc_threshold,
|
||||||
N_( "image size above which to decompress to disc" ), NULL },
|
N_( "image size above which to decompress to disc" ), NULL },
|
||||||
{ "vips-novector", 't', G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE,
|
{ "vips-novector", 't', G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE,
|
||||||
&vips__vector_enabled,
|
&vips__vector_enabled,
|
||||||
@ -535,7 +535,7 @@ guess_prefix( const char *argv0, const char *name )
|
|||||||
|
|
||||||
/* Fall back to the configure-time prefix.
|
/* Fall back to the configure-time prefix.
|
||||||
*/
|
*/
|
||||||
return( IM_PREFIX );
|
return( VIPS_PREFIX );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -580,10 +580,10 @@ vips_guess_prefix( const char *argv0, const char *env_name )
|
|||||||
|
|
||||||
/* Add the exe suffix, if it's missing.
|
/* Add the exe suffix, if it's missing.
|
||||||
*/
|
*/
|
||||||
if( strlen( IM_EXEEXT ) > 0 ) {
|
if( strlen( VIPS_EXEEXT ) > 0 ) {
|
||||||
const char *olds[] = { IM_EXEEXT };
|
const char *olds[] = { VIPS_EXEEXT };
|
||||||
|
|
||||||
vips__change_suffix( p, name, PATH_MAX, IM_EXEEXT, olds, 1 );
|
vips__change_suffix( p, name, PATH_MAX, VIPS_EXEEXT, olds, 1 );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
vips_strncpy( name, p, PATH_MAX );
|
vips_strncpy( name, p, PATH_MAX );
|
||||||
@ -632,14 +632,14 @@ vips_guess_libdir( const char *argv0, const char *env_name )
|
|||||||
/* Have we been moved since configure? If not, use the configure-time
|
/* Have we been moved since configure? If not, use the configure-time
|
||||||
* libdir.
|
* libdir.
|
||||||
*/
|
*/
|
||||||
if( strcmp( prefix, IM_PREFIX ) == 0 )
|
if( strcmp( prefix, VIPS_PREFIX ) == 0 )
|
||||||
libdir = IM_LIBDIR;
|
libdir = VIPS_LIBDIR;
|
||||||
else
|
else
|
||||||
libdir = g_strdup_printf( "%s/lib", prefix );
|
libdir = g_strdup_printf( "%s/lib", prefix );
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf( "vips_guess_libdir: IM_PREFIX = %s\n", IM_PREFIX );
|
printf( "vips_guess_libdir: VIPS_PREFIX = %s\n", VIPS_PREFIX );
|
||||||
printf( "vips_guess_libdir: IM_LIBDIR = %s\n", IM_LIBDIR );
|
printf( "vips_guess_libdir: VIPS_LIBDIR = %s\n", VIPS_LIBDIR );
|
||||||
printf( "vips_guess_libdir: prefix = %s\n", prefix );
|
printf( "vips_guess_libdir: prefix = %s\n", prefix );
|
||||||
printf( "vips_guess_libdir: libdir = %s\n", libdir );
|
printf( "vips_guess_libdir: libdir = %s\n", libdir );
|
||||||
#endif /*DEBUG*/
|
#endif /*DEBUG*/
|
||||||
|
@ -155,7 +155,7 @@ vips_free( void *s )
|
|||||||
|
|
||||||
next_trace += 1;
|
next_trace += 1;
|
||||||
if( next_trace > trace_freq ) {
|
if( next_trace > trace_freq ) {
|
||||||
printf( "im_free: %d, %d allocs, total %.3gM, "
|
printf( "vips_free: %d, %d allocs, total %.3gM, "
|
||||||
"high water %.3gM\n",
|
"high water %.3gM\n",
|
||||||
size,
|
size,
|
||||||
total_allocs,
|
total_allocs,
|
||||||
@ -191,8 +191,8 @@ vips_malloc_cb( VipsImage *image, char *buf )
|
|||||||
*
|
*
|
||||||
* Malloc local to @im, that is, the memory will be automatically
|
* Malloc local to @im, that is, the memory will be automatically
|
||||||
* freed for you when the image is closed. If @im is %NULL, you need to free
|
* freed for you when the image is closed. If @im is %NULL, you need to free
|
||||||
* the memory explicitly with im_free().
|
* the memory explicitly with vips_free().
|
||||||
* If allocation fails im_malloc() returns %NULL and
|
* If allocation fails vips_malloc() returns %NULL and
|
||||||
* sets an error message.
|
* sets an error message.
|
||||||
*
|
*
|
||||||
* If two threads try to allocate local to the same @im at the same time, you
|
* If two threads try to allocate local to the same @im at the same time, you
|
||||||
@ -206,7 +206,7 @@ vips_malloc( VipsImage *image, size_t size )
|
|||||||
void *buf;
|
void *buf;
|
||||||
|
|
||||||
#ifdef DEBUGM
|
#ifdef DEBUGM
|
||||||
/* Assume the first im_malloc() is single-threaded.
|
/* Assume the first vips_malloc() is single-threaded.
|
||||||
*/
|
*/
|
||||||
if( !malloc_mutex )
|
if( !malloc_mutex )
|
||||||
malloc_mutex = g_mutex_new();
|
malloc_mutex = g_mutex_new();
|
||||||
@ -225,10 +225,10 @@ vips_malloc( VipsImage *image, size_t size )
|
|||||||
g_assert( 0 );
|
g_assert( 0 );
|
||||||
#endif /*DEBUG*/
|
#endif /*DEBUG*/
|
||||||
|
|
||||||
vips_error( "im_malloc",
|
vips_error( "vips_malloc",
|
||||||
_( "out of memory --- size == %dMB" ),
|
_( "out of memory --- size == %dMB" ),
|
||||||
(int) (size / (1024.0*1024.0)) );
|
(int) (size / (1024.0*1024.0)) );
|
||||||
vips_warn( "im_malloc",
|
vips_warn( "vips_malloc",
|
||||||
_( "out of memory --- size == %dMB" ),
|
_( "out of memory --- size == %dMB" ),
|
||||||
(int) (size / (1024.0*1024.0)) );
|
(int) (size / (1024.0*1024.0)) );
|
||||||
return( NULL );
|
return( NULL );
|
||||||
|
@ -329,13 +329,13 @@ vips_region_print( VipsObject *object, VipsBuf *buf )
|
|||||||
/* If a region is being created in one thread (eg. the main thread) and then
|
/* If a region is being created in one thread (eg. the main thread) and then
|
||||||
* used in another (eg. a worker thread), the new thread needs to tell VIPS
|
* used in another (eg. a worker thread), the new thread needs to tell VIPS
|
||||||
* to stop sanity g_assert() fails. The previous owner needs to
|
* to stop sanity g_assert() fails. The previous owner needs to
|
||||||
* im__region_no_ownership() before we can call this.
|
* vips__region_no_ownership() before we can call this.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
vips__region_take_ownership( VipsRegion *region )
|
vips__region_take_ownership( VipsRegion *region )
|
||||||
{
|
{
|
||||||
/* Lock so that there's a memory barrier with the thread doing the
|
/* Lock so that there's a memory barrier with the thread doing the
|
||||||
* im__region_no_ownership() before us.
|
* vips__region_no_ownership() before us.
|
||||||
*/
|
*/
|
||||||
g_mutex_lock( region->im->sslock );
|
g_mutex_lock( region->im->sslock );
|
||||||
|
|
||||||
@ -943,10 +943,10 @@ vips_region_generate( VipsRegion *reg )
|
|||||||
* blocks until the pixels are ready.
|
* blocks until the pixels are ready.
|
||||||
*
|
*
|
||||||
* Use vips_region_prepare_thread() to calculate an area of pixels with many
|
* Use vips_region_prepare_thread() to calculate an area of pixels with many
|
||||||
* threads. Use im_render_priority() to calculate an area of pixels in the
|
* threads. Use vips_sink_screen() to calculate an area of pixels in the
|
||||||
* background.
|
* background.
|
||||||
*
|
*
|
||||||
* See also: vips_region_prepare_thread(), im_render_priority(),
|
* See also: vips_region_prepare_thread(), vips_sink_screen(),
|
||||||
* vips_region_prepare_to().
|
* vips_region_prepare_to().
|
||||||
*
|
*
|
||||||
* Returns: 0 on success, or -1 on error.
|
* Returns: 0 on success, or -1 on error.
|
||||||
@ -1031,7 +1031,8 @@ vips_region_prepare_to_generate( VipsRegion *reg,
|
|||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
if( !im->generate ) {
|
if( !im->generate ) {
|
||||||
vips_error( "im_prepare_to", "%s", _( "incomplete header" ) );
|
vips_error( "vips_region_prepare_to",
|
||||||
|
"%s", _( "incomplete header" ) );
|
||||||
return( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1101,14 +1102,14 @@ vips_region_prepare_to( VipsRegion *reg,
|
|||||||
if( !dest->data ||
|
if( !dest->data ||
|
||||||
dest->im->BandFmt != reg->im->BandFmt ||
|
dest->im->BandFmt != reg->im->BandFmt ||
|
||||||
dest->im->Bands != reg->im->Bands ) {
|
dest->im->Bands != reg->im->Bands ) {
|
||||||
vips_error( "im_prepare_to",
|
vips_error( "vips_region_prepare_to",
|
||||||
"%s", _( "inappropriate region type" ) );
|
"%s", _( "inappropriate region type" ) );
|
||||||
return( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* clip r first against the size of reg->im, then again against the
|
/* clip r first against the size of reg->im, then again against the
|
||||||
* memory we have available to write to on dest. Just like
|
* memory we have available to write to on dest. Just like
|
||||||
* im_region_region()
|
* vips_region_region()
|
||||||
*/
|
*/
|
||||||
image.top = 0;
|
image.top = 0;
|
||||||
image.left = 0;
|
image.left = 0;
|
||||||
@ -1127,7 +1128,8 @@ vips_region_prepare_to( VipsRegion *reg,
|
|||||||
/* Test that dest->valid is large enough.
|
/* Test that dest->valid is large enough.
|
||||||
*/
|
*/
|
||||||
if( !vips_rect_includesrect( &dest->valid, &wanted ) ) {
|
if( !vips_rect_includesrect( &dest->valid, &wanted ) ) {
|
||||||
vips_error( "im_prepare_to", "%s", _( "dest too small" ) );
|
vips_error( "vips_region_prepare_to",
|
||||||
|
"%s", _( "dest too small" ) );
|
||||||
return( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1144,13 +1146,14 @@ vips_region_prepare_to( VipsRegion *reg,
|
|||||||
y = clipped2.top;
|
y = clipped2.top;
|
||||||
|
|
||||||
if( vips_rect_isempty( &final ) ) {
|
if( vips_rect_isempty( &final ) ) {
|
||||||
vips_error( "im_prepare_to",
|
vips_error( "vips_region_prepare_to",
|
||||||
"%s", _( "valid clipped to nothing" ) );
|
"%s", _( "valid clipped to nothing" ) );
|
||||||
return( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf( "im_prepare_to: left = %d, top = %d, width = %d, height = %d\n",
|
printf( "vips_region_prepare_to: "
|
||||||
|
"left = %d, top = %d, width = %d, height = %d\n",
|
||||||
final.left, final.top, final.width, final.height );
|
final.left, final.top, final.width, final.height );
|
||||||
#endif /*DEBUG*/
|
#endif /*DEBUG*/
|
||||||
|
|
||||||
@ -1196,8 +1199,9 @@ vips_region_prepare_to( VipsRegion *reg,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
vips_error( "im_prepare_to", _( "unable to input from a "
|
vips_error( "vips_region_prepare_to",
|
||||||
"%s image" ), im_dtype2char( im->dtype ) );
|
_( "unable to input from a %s image" ),
|
||||||
|
VIPS_ENUM_NICK( VIPS_TYPE_DEMAND_STYLE, im->dtype ) );
|
||||||
return( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ vips_semaphore_upn( VipsSemaphore *s, int n )
|
|||||||
printf( "vips_semaphore_upn(\"%s\",%d) = %d\n",
|
printf( "vips_semaphore_upn(\"%s\",%d) = %d\n",
|
||||||
s->name, n, value_after_op );
|
s->name, n, value_after_op );
|
||||||
if( value_after_op > 1 )
|
if( value_after_op > 1 )
|
||||||
im_errormsg( "up over 1!" );
|
vips_error( "vips_semaphore_upn", "up over 1!" );
|
||||||
#endif /*DEBUG_IO*/
|
#endif /*DEBUG_IO*/
|
||||||
|
|
||||||
return( value_after_op );
|
return( value_after_op );
|
||||||
|
@ -99,10 +99,6 @@ typedef struct _Write {
|
|||||||
void *a;
|
void *a;
|
||||||
} Write;
|
} Write;
|
||||||
|
|
||||||
/* Enable im_wbuffer2 ... set from the cmd line, tested by our users.
|
|
||||||
*/
|
|
||||||
int im__wbuffer2 = 0;
|
|
||||||
|
|
||||||
/* Our per-thread state ... we need to also track the buffer that pos is
|
/* Our per-thread state ... we need to also track the buffer that pos is
|
||||||
* supposed to write to.
|
* supposed to write to.
|
||||||
*/
|
*/
|
||||||
@ -468,7 +464,7 @@ write_free( Write *write )
|
|||||||
* This operation is handy for making image sinks which output to things like
|
* This operation is handy for making image sinks which output to things like
|
||||||
* disc files.
|
* disc files.
|
||||||
*
|
*
|
||||||
* See also: im_concurrency_set().
|
* See also: vips_concurrency_set().
|
||||||
*
|
*
|
||||||
* Returns: 0 on success, -1 on error.
|
* Returns: 0 on success, -1 on error.
|
||||||
*/
|
*/
|
||||||
|
@ -535,7 +535,7 @@ render_thread_create( void )
|
|||||||
if( !render_thread && have_threads ) {
|
if( !render_thread && have_threads ) {
|
||||||
if( !(render_thread = g_thread_create_full(
|
if( !(render_thread = g_thread_create_full(
|
||||||
render_thread_main, NULL,
|
render_thread_main, NULL,
|
||||||
IM__DEFAULT_STACK_SIZE, TRUE, FALSE,
|
VIPS__DEFAULT_STACK_SIZE, TRUE, FALSE,
|
||||||
G_THREAD_PRIORITY_NORMAL, NULL )) ) {
|
G_THREAD_PRIORITY_NORMAL, NULL )) ) {
|
||||||
vips_error( "sink_screen",
|
vips_error( "sink_screen",
|
||||||
"%s", _( "unable to create thread" ) );
|
"%s", _( "unable to create thread" ) );
|
||||||
|
@ -96,14 +96,14 @@
|
|||||||
|
|
||||||
/* Default tile geometry ... can be set by init_world.
|
/* Default tile geometry ... can be set by init_world.
|
||||||
*/
|
*/
|
||||||
int im__tile_width = IM__TILE_WIDTH;
|
int vips__tile_width = VIPS__TILE_WIDTH;
|
||||||
int im__tile_height = IM__TILE_HEIGHT;
|
int vips__tile_height = VIPS__TILE_HEIGHT;
|
||||||
int im__fatstrip_height = IM__FATSTRIP_HEIGHT;
|
int vips__fatstrip_height = VIPS__FATSTRIP_HEIGHT;
|
||||||
int im__thinstrip_height = IM__THINSTRIP_HEIGHT;
|
int vips__thinstrip_height = VIPS__THINSTRIP_HEIGHT;
|
||||||
|
|
||||||
/* Default n threads ... 0 means get from environment.
|
/* Default n threads ... 0 means get from environment.
|
||||||
*/
|
*/
|
||||||
int im__concurrency = 0;
|
int vips__concurrency = 0;
|
||||||
|
|
||||||
#ifndef HAVE_THREADS
|
#ifndef HAVE_THREADS
|
||||||
/* If we're building without gthread, we need stubs for the g_thread_*() and
|
/* If we're building without gthread, we need stubs for the g_thread_*() and
|
||||||
@ -111,24 +111,24 @@ int im__concurrency = 0;
|
|||||||
* names here.
|
* names here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void im__g_thread_init( GThreadFunctions *vtable ) {}
|
void vips__g_thread_init( GThreadFunctions *vtable ) {}
|
||||||
gpointer im__g_thread_join( GThread *dummy ) { return( NULL ); }
|
gpointer vips__g_thread_join( GThread *dummy ) { return( NULL ); }
|
||||||
gpointer im__g_thread_self( void ) { return( NULL ); }
|
gpointer vips__g_thread_self( void ) { return( NULL ); }
|
||||||
GThread *im__g_thread_create_full( GThreadFunc d1,
|
GThread *vips__g_thread_create_full( GThreadFunc d1,
|
||||||
gpointer d2, gulong d3, gboolean d4, gboolean d5, GThreadPriority d6,
|
gpointer d2, gulong d3, gboolean d4, gboolean d5, GThreadPriority d6,
|
||||||
GError **d7 )
|
GError **d7 )
|
||||||
{ return( NULL ); }
|
{ return( NULL ); }
|
||||||
|
|
||||||
GMutex *im__g_mutex_new( void ) { return( NULL ); }
|
GMutex *vips__g_mutex_new( void ) { return( NULL ); }
|
||||||
void im__g_mutex_free( GMutex *d ) {}
|
void vips__g_mutex_free( GMutex *d ) {}
|
||||||
void im__g_mutex_lock( GMutex *d ) {}
|
void vips__g_mutex_lock( GMutex *d ) {}
|
||||||
void im__g_mutex_unlock( GMutex *d ) {}
|
void vips__g_mutex_unlock( GMutex *d ) {}
|
||||||
#endif /*!HAVE_THREADS*/
|
#endif /*!HAVE_THREADS*/
|
||||||
|
|
||||||
void
|
void
|
||||||
im_concurrency_set( int concurrency )
|
vips_concurrency_set( int concurrency )
|
||||||
{
|
{
|
||||||
im__concurrency = concurrency;
|
vips__concurrency = concurrency;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -198,7 +198,7 @@ get_num_processors( void )
|
|||||||
* the number of regions we should pass over the image.
|
* the number of regions we should pass over the image.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
im_concurrency_get( void )
|
vips_concurrency_get( void )
|
||||||
{
|
{
|
||||||
const char *str;
|
const char *str;
|
||||||
int nthr;
|
int nthr;
|
||||||
@ -206,8 +206,8 @@ im_concurrency_get( void )
|
|||||||
|
|
||||||
/* Tell the threads system how much concurrency we expect.
|
/* Tell the threads system how much concurrency we expect.
|
||||||
*/
|
*/
|
||||||
if( im__concurrency > 0 )
|
if( vips__concurrency > 0 )
|
||||||
nthr = im__concurrency;
|
nthr = vips__concurrency;
|
||||||
else if( (str = g_getenv( IM_CONCURRENCY )) &&
|
else if( (str = g_getenv( IM_CONCURRENCY )) &&
|
||||||
(x = atoi( str )) > 0 )
|
(x = atoi( str )) > 0 )
|
||||||
nthr = x;
|
nthr = x;
|
||||||
@ -217,13 +217,13 @@ im_concurrency_get( void )
|
|||||||
if( nthr < 1 || nthr > MAX_THREADS ) {
|
if( nthr < 1 || nthr > MAX_THREADS ) {
|
||||||
nthr = VIPS_CLIP( 1, nthr, MAX_THREADS );
|
nthr = VIPS_CLIP( 1, nthr, MAX_THREADS );
|
||||||
|
|
||||||
vips_warn( "im_concurrency_get",
|
vips_warn( "vips_concurrency_get",
|
||||||
_( "threads clipped to %d" ), nthr );
|
_( "threads clipped to %d" ), nthr );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Save for next time around.
|
/* Save for next time around.
|
||||||
*/
|
*/
|
||||||
im_concurrency_set( nthr );
|
vips_concurrency_set( nthr );
|
||||||
|
|
||||||
return( nthr );
|
return( nthr );
|
||||||
}
|
}
|
||||||
@ -400,10 +400,10 @@ vips_thread_save_time_buffers( VipsThread *thr )
|
|||||||
FILE *fp;
|
FILE *fp;
|
||||||
char name[256];
|
char name[256];
|
||||||
|
|
||||||
im_snprintf( name, 256, "time%d", rn++ );
|
vips_snprintf( name, 256, "time%d", rn++ );
|
||||||
printf( "vips_thread_save_time_buffers: "
|
printf( "vips_thread_save_time_buffers: "
|
||||||
"saving buffer to \"%s\"\n", name );
|
"saving buffer to \"%s\"\n", name );
|
||||||
if( !(fp = im__file_open_write( name, TRUE )) )
|
if( !(fp = vips__file_open_write( name, TRUE )) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
for( i = 0; i < thr->tpos; i++ )
|
for( i = 0; i < thr->tpos; i++ )
|
||||||
fprintf( fp, "%g, %g\n", thr->btime[i], thr->etime[i] );
|
fprintf( fp, "%g, %g\n", thr->btime[i], thr->etime[i] );
|
||||||
@ -603,7 +603,7 @@ vips_thread_new( VipsThreadpool *pool )
|
|||||||
* very small values (eg. various BSDs).
|
* very small values (eg. various BSDs).
|
||||||
*/
|
*/
|
||||||
if( !(thr->thread = g_thread_create_full( vips_thread_main_loop, thr,
|
if( !(thr->thread = g_thread_create_full( vips_thread_main_loop, thr,
|
||||||
IM__DEFAULT_STACK_SIZE, TRUE, FALSE,
|
VIPS__DEFAULT_STACK_SIZE, TRUE, FALSE,
|
||||||
G_THREAD_PRIORITY_NORMAL, NULL )) ) {
|
G_THREAD_PRIORITY_NORMAL, NULL )) ) {
|
||||||
vips_error( "vips_thread_new",
|
vips_error( "vips_thread_new",
|
||||||
"%s", _( "unable to create thread" ) );
|
"%s", _( "unable to create thread" ) );
|
||||||
@ -669,7 +669,7 @@ vips_threadpool_new( VipsImage *im )
|
|||||||
pool->allocate = NULL;
|
pool->allocate = NULL;
|
||||||
pool->work = NULL;
|
pool->work = NULL;
|
||||||
pool->allocate_lock = g_mutex_new();
|
pool->allocate_lock = g_mutex_new();
|
||||||
pool->nthr = im_concurrency_get();
|
pool->nthr = vips_concurrency_get();
|
||||||
pool->thr = NULL;
|
pool->thr = NULL;
|
||||||
vips_semaphore_init( &pool->finish, 0, "finish" );
|
vips_semaphore_init( &pool->finish, 0, "finish" );
|
||||||
vips_semaphore_init( &pool->tick, 0, "tick" );
|
vips_semaphore_init( &pool->tick, 0, "tick" );
|
||||||
@ -813,7 +813,7 @@ vips_threadpool_create_threads( VipsThreadpool *pool )
|
|||||||
* always called by
|
* always called by
|
||||||
* the main thread (ie. the thread which called vips_threadpool_run()).
|
* the main thread (ie. the thread which called vips_threadpool_run()).
|
||||||
*
|
*
|
||||||
* See also: im_wbuffer2(), im_concurrency_set().
|
* See also: vips_concurrency_set().
|
||||||
*
|
*
|
||||||
* Returns: 0 on success, or -1 on error.
|
* Returns: 0 on success, or -1 on error.
|
||||||
*/
|
*/
|
||||||
@ -893,21 +893,21 @@ vips_threadpool_run( VipsImage *im,
|
|||||||
* @nlines: return buffer height in scanlines
|
* @nlines: return buffer height in scanlines
|
||||||
*
|
*
|
||||||
* Pick a tile size and a buffer height for this image and the current
|
* Pick a tile size and a buffer height for this image and the current
|
||||||
* value of im_concurrency_get(). The buffer height
|
* value of vips_concurrency_get(). The buffer height
|
||||||
* will always be a multiple of tile_height.
|
* will always be a multiple of tile_height.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
vips_get_tile_size( VipsImage *im,
|
vips_get_tile_size( VipsImage *im,
|
||||||
int *tile_width, int *tile_height, int *nlines )
|
int *tile_width, int *tile_height, int *nlines )
|
||||||
{
|
{
|
||||||
const int nthr = im_concurrency_get();
|
const int nthr = vips_concurrency_get();
|
||||||
|
|
||||||
/* Pick a render geometry.
|
/* Pick a render geometry.
|
||||||
*/
|
*/
|
||||||
switch( im->dhint ) {
|
switch( im->dhint ) {
|
||||||
case VIPS_DEMAND_STYLE_SMALLTILE:
|
case VIPS_DEMAND_STYLE_SMALLTILE:
|
||||||
*tile_width = im__tile_width;
|
*tile_width = vips__tile_width;
|
||||||
*tile_height = im__tile_height;
|
*tile_height = vips__tile_height;
|
||||||
|
|
||||||
/* Enough lines of tiles that we can expect to be able to keep
|
/* Enough lines of tiles that we can expect to be able to keep
|
||||||
* nthr busy. Then double it.
|
* nthr busy. Then double it.
|
||||||
@ -919,13 +919,13 @@ vips_get_tile_size( VipsImage *im,
|
|||||||
case VIPS_DEMAND_STYLE_ANY:
|
case VIPS_DEMAND_STYLE_ANY:
|
||||||
case VIPS_DEMAND_STYLE_FATSTRIP:
|
case VIPS_DEMAND_STYLE_FATSTRIP:
|
||||||
*tile_width = im->Xsize;
|
*tile_width = im->Xsize;
|
||||||
*tile_height = im__fatstrip_height;
|
*tile_height = vips__fatstrip_height;
|
||||||
*nlines = *tile_height * nthr * 2;
|
*nlines = *tile_height * nthr * 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VIPS_DEMAND_STYLE_THINSTRIP:
|
case VIPS_DEMAND_STYLE_THINSTRIP:
|
||||||
*tile_width = im->Xsize;
|
*tile_width = im->Xsize;
|
||||||
*tile_height = im__thinstrip_height;
|
*tile_height = vips__thinstrip_height;
|
||||||
*nlines = *tile_height * nthr * 2;
|
*nlines = *tile_height * nthr * 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -846,7 +846,7 @@ vips__writehist( VipsImage *im )
|
|||||||
|
|
||||||
vips_snprintf( namespace, 256, "%s/%d.%d.%d",
|
vips_snprintf( namespace, 256, "%s/%d.%d.%d",
|
||||||
NAMESPACE,
|
NAMESPACE,
|
||||||
IM_MAJOR_VERSION, IM_MINOR_VERSION, IM_MICRO_VERSION );
|
VIPS_MAJOR_VERSION, VIPS_MINOR_VERSION, VIPS_MICRO_VERSION );
|
||||||
if( !(doc->children = xmlNewDocNode( doc,
|
if( !(doc->children = xmlNewDocNode( doc,
|
||||||
NULL, (xmlChar *) "root", NULL )) ||
|
NULL, (xmlChar *) "root", NULL )) ||
|
||||||
set_sprop( doc->children, "xmlns", namespace ) ||
|
set_sprop( doc->children, "xmlns", namespace ) ||
|
||||||
@ -908,7 +908,7 @@ vips_image_open_input( VipsImage *image )
|
|||||||
/* We don't use im->sizeof_header here, but we know we're reading a
|
/* We don't use im->sizeof_header here, but we know we're reading a
|
||||||
* VIPS image anyway.
|
* VIPS image anyway.
|
||||||
*/
|
*/
|
||||||
unsigned char header[IM_SIZEOF_HEADER];
|
unsigned char header[VIPS_SIZEOF_HEADER];
|
||||||
|
|
||||||
gint64 psize;
|
gint64 psize;
|
||||||
gint64 rsize;
|
gint64 rsize;
|
||||||
@ -916,7 +916,8 @@ vips_image_open_input( VipsImage *image )
|
|||||||
image->dtype = VIPS_IMAGE_OPENIN;
|
image->dtype = VIPS_IMAGE_OPENIN;
|
||||||
if( (image->fd = vips__open_image_read( image->filename )) == -1 )
|
if( (image->fd = vips__open_image_read( image->filename )) == -1 )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
if( read( image->fd, header, IM_SIZEOF_HEADER ) != IM_SIZEOF_HEADER ||
|
if( read( image->fd, header, VIPS_SIZEOF_HEADER ) !=
|
||||||
|
VIPS_SIZEOF_HEADER ||
|
||||||
vips__read_header_bytes( image, header ) ) {
|
vips__read_header_bytes( image, header ) ) {
|
||||||
vips_error_system( errno, "VipsImage",
|
vips_error_system( errno, "VipsImage",
|
||||||
_( "unable to read header for \"%s\"" ),
|
_( "unable to read header for \"%s\"" ),
|
||||||
@ -959,7 +960,7 @@ vips_image_open_output( VipsImage *image )
|
|||||||
/* Don't use im->sizeof_header here, but we know we're
|
/* Don't use im->sizeof_header here, but we know we're
|
||||||
* writing a VIPS image anyway.
|
* writing a VIPS image anyway.
|
||||||
*/
|
*/
|
||||||
unsigned char header[IM_SIZEOF_HEADER];
|
unsigned char header[VIPS_SIZEOF_HEADER];
|
||||||
|
|
||||||
if( (image->fd = open( image->filename,
|
if( (image->fd = open( image->filename,
|
||||||
MODE_WRITE, 0666 )) < 0 ) {
|
MODE_WRITE, 0666 )) < 0 ) {
|
||||||
@ -970,7 +971,7 @@ vips_image_open_output( VipsImage *image )
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( vips__write_header_bytes( image, header ) ||
|
if( vips__write_header_bytes( image, header ) ||
|
||||||
vips__write( image->fd, header, IM_SIZEOF_HEADER ) )
|
vips__write( image->fd, header, VIPS_SIZEOF_HEADER ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,12 +73,12 @@ int vips__read_test;
|
|||||||
|
|
||||||
/* Add this many lines above and below the mmap() window.
|
/* Add this many lines above and below the mmap() window.
|
||||||
*/
|
*/
|
||||||
int vips__window_margin_pixels = IM__WINDOW_MARGIN_PIXELS;
|
int vips__window_margin_pixels = VIPS__WINDOW_MARGIN_PIXELS;
|
||||||
|
|
||||||
/* Always map at least this many bytes. There's no point making tiny windows
|
/* Always map at least this many bytes. There's no point making tiny windows
|
||||||
* on small files.
|
* on small files.
|
||||||
*/
|
*/
|
||||||
int vips__window_margin_bytes = IM__WINDOW_MARGIN_BYTES;
|
int vips__window_margin_bytes = VIPS__WINDOW_MARGIN_BYTES;
|
||||||
|
|
||||||
/* Track global mmap usage.
|
/* Track global mmap usage.
|
||||||
*/
|
*/
|
||||||
|
@ -3,7 +3,7 @@ exec_prefix=@exec_prefix@
|
|||||||
libdir=@libdir@
|
libdir=@libdir@
|
||||||
includedir=@includedir@
|
includedir=@includedir@
|
||||||
|
|
||||||
Name: vips-@IM_MAJOR_VERSION@.@IM_MINOR_VERSION@
|
Name: vips-@VIPS_MAJOR_VERSION@.@VIPS_MINOR_VERSION@
|
||||||
Description: Image processing library
|
Description: Image processing library
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Requires: @PACKAGES_USED@
|
Requires: @PACKAGES_USED@
|
||||||
|
@ -3,8 +3,8 @@ exec_prefix=@exec_prefix@
|
|||||||
libdir=@libdir@
|
libdir=@libdir@
|
||||||
includedir=@includedir@
|
includedir=@includedir@
|
||||||
|
|
||||||
Name: vipsCC-@IM_MAJOR_VERSION@.@IM_MINOR_VERSION@
|
Name: vipsCC-@VIPS_MAJOR_VERSION@.@VIPS_MINOR_VERSION@
|
||||||
Description: C++ API for vips image processing library
|
Description: C++ API for vips image processing library
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Requires: vips-@IM_MAJOR_VERSION@.@IM_MINOR_VERSION@ = @VERSION@
|
Requires: vips-@VIPS_MAJOR_VERSION@.@VIPS_MINOR_VERSION@ = @VERSION@
|
||||||
Libs: -L${libdir} -lvipsCC
|
Libs: -L${libdir} -lvipsCC
|
||||||
|
Loading…
Reference in New Issue
Block a user