add some API for args, fix a docs messup
This commit is contained in:
parent
094f690042
commit
339f268200
@ -12,6 +12,7 @@
|
|||||||
- jpg, magick, png, tiff readers now use only 1 fd per input image
|
- jpg, magick, png, tiff readers now use only 1 fd per input image
|
||||||
- python: use [] to index and slice image bands
|
- python: use [] to index and slice image bands
|
||||||
- c++: use [] to band index, () returns a vector<double>
|
- c++: use [] to band index, () returns a vector<double>
|
||||||
|
- added vips_info_set(), vips_progress_set(), vips_profile_set()
|
||||||
|
|
||||||
6/2/15 started 7.42.3
|
6/2/15 started 7.42.3
|
||||||
- bump version for back-compat ABI change
|
- bump version for back-compat ABI change
|
||||||
|
10
TODO
10
TODO
@ -1,3 +1,5 @@
|
|||||||
|
- does cplusplus need flipver() etc.?
|
||||||
|
|
||||||
- are the mosaic functions calling vips_fastcor()? it must be very slow
|
- are the mosaic functions calling vips_fastcor()? it must be very slow
|
||||||
|
|
||||||
add vips_fastcor_direct()
|
add vips_fastcor_direct()
|
||||||
@ -21,14 +23,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
- need API for the stuff that's currently settable only by --whatever flags,
|
|
||||||
eg. --vips-profile
|
|
||||||
|
|
||||||
python people are not going to want to use the glib arg parser, for example
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- support orientation tag in tiff images
|
- support orientation tag in tiff images
|
||||||
|
|
||||||
see
|
see
|
||||||
|
@ -270,13 +270,13 @@ VImage mask = (xyz[0].pow( 2 ) + xyz[1].pow( 2 )).pow( 0.5 ) < 100;
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The API overloads <code>()<code> to be vips_getpoint(). You can
|
The API overloads <code>()</code> to be vips_getpoint(). You can
|
||||||
write:
|
write:
|
||||||
|
|
||||||
<programlisting language="C++">
|
<programlisting language="C++">
|
||||||
VImage xyz = VImage::xyz( 256, 256 ) - VImage::to_vectorv( 2, 128.0, 128.0 );
|
VImage xyz = VImage::xyz( 256, 256 ) - VImage::to_vectorv( 2, 128.0, 128.0 );
|
||||||
// this will have the value [0, 0]
|
// this will have the value [0, 0]
|
||||||
std::vector<double> point = xyz(128, 128);
|
std::vector<double> point = xyz(128, 128);
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -53,6 +53,7 @@ void vips_g_error( GError **error );
|
|||||||
void vips_warn( const char *domain, const char *fmt, ... )
|
void vips_warn( const char *domain, const char *fmt, ... )
|
||||||
__attribute__((format(printf, 2, 3)));
|
__attribute__((format(printf, 2, 3)));
|
||||||
void vips_vwarn( const char *domain, const char *fmt, va_list ap );
|
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, ... )
|
void vips_info( const char *domain, const char *fmt, ... )
|
||||||
__attribute__((format(printf, 2, 3)));
|
__attribute__((format(printf, 2, 3)));
|
||||||
void vips_vinfo( const char *domain, const char *fmt, va_list ap );
|
void vips_vinfo( const char *domain, const char *fmt, va_list ap );
|
||||||
|
@ -63,6 +63,8 @@ G_STMT_START { \
|
|||||||
|
|
||||||
extern gboolean vips__thread_profile;
|
extern gboolean vips__thread_profile;
|
||||||
|
|
||||||
|
void vips_profile_set( gboolean profile );
|
||||||
|
|
||||||
void vips__thread_profile_attach( const char *thread_name );
|
void vips__thread_profile_attach( const char *thread_name );
|
||||||
void vips__thread_profile_detach( void );
|
void vips__thread_profile_detach( void );
|
||||||
void vips__thread_profile_stop( void );
|
void vips__thread_profile_stop( void );
|
||||||
|
@ -408,6 +408,8 @@ extern const guint64 vips__image_sizeof_bandformat[];
|
|||||||
((double *) VIPS_IMAGE_ADDR( I, X, Y ))
|
((double *) VIPS_IMAGE_ADDR( I, X, Y ))
|
||||||
#endif /*VIPS_DEBUG*/
|
#endif /*VIPS_DEBUG*/
|
||||||
|
|
||||||
|
void vips_progress_set( gboolean progress );
|
||||||
|
|
||||||
void vips_image_invalidate_all( VipsImage *image );
|
void vips_image_invalidate_all( VipsImage *image );
|
||||||
|
|
||||||
void vips_image_minimise_all( VipsImage *image );
|
void vips_image_minimise_all( VipsImage *image );
|
||||||
|
@ -371,6 +371,20 @@ vips_error_clear( void )
|
|||||||
g_mutex_unlock( vips__global_lock );
|
g_mutex_unlock( vips__global_lock );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* vips_info_set:
|
||||||
|
* @info: %TRUE to enable info messages
|
||||||
|
*
|
||||||
|
* If set, vips will output various informative messages to stderr as it works.
|
||||||
|
*
|
||||||
|
* See also: vips_info().
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
vips_info_set( gboolean info )
|
||||||
|
{
|
||||||
|
vips__info = info;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* vips_vinfo:
|
* vips_vinfo:
|
||||||
* @domain: the source of the message
|
* @domain: the source of the message
|
||||||
@ -378,13 +392,13 @@ vips_error_clear( void )
|
|||||||
* @ap: arguments to the format string
|
* @ap: arguments to the format string
|
||||||
*
|
*
|
||||||
* Sends a formatted informational message to stderr if the --vips-info flag
|
* Sends a formatted informational message to stderr if the --vips-info flag
|
||||||
* has been given to the program or the environment variable IM_INFO has been
|
* has been given to the program, or the environment variable VIPS_INFO has been
|
||||||
* defined.
|
* defined, or if vips_info_set() has been called.
|
||||||
*
|
*
|
||||||
* Informational messages are used to report details about the operation of
|
* Informational messages are used to report details about the operation of
|
||||||
* functions.
|
* functions.
|
||||||
*
|
*
|
||||||
* See also: vips_info(), vips_warn().
|
* See also: vips_info(), vips_info_set(), vips_warn().
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
vips_vinfo( const char *domain, const char *fmt, va_list ap )
|
vips_vinfo( const char *domain, const char *fmt, va_list ap )
|
||||||
@ -407,13 +421,13 @@ vips_vinfo( const char *domain, const char *fmt, va_list ap )
|
|||||||
* @...: arguments to the format string
|
* @...: arguments to the format string
|
||||||
*
|
*
|
||||||
* Sends a formatted informational message to stderr if the --vips-info flag
|
* Sends a formatted informational message to stderr if the --vips-info flag
|
||||||
* has been given to the program or the environment variable IM_INFO has been
|
* has been given to the program or the environment variable VIPS_INFO has been
|
||||||
* defined.
|
* defined, or if vips_info_set() has been called.
|
||||||
*
|
*
|
||||||
* Informational messages are used to report details about the operation of
|
* Informational messages are used to report details about the operation of
|
||||||
* functions.
|
* functions.
|
||||||
*
|
*
|
||||||
* See also: vips_vinfo(), vips_warn().
|
* See also: vips_info_set(), vips_vinfo(), vips_warn().
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
vips_info( const char *domain, const char *fmt, ... )
|
vips_info( const char *domain, const char *fmt, ... )
|
||||||
|
@ -84,6 +84,19 @@ static GPrivate *vips_thread_profile_key = NULL;
|
|||||||
|
|
||||||
static FILE *vips__thread_fp = NULL;;
|
static FILE *vips__thread_fp = NULL;;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* vips_profile_set:
|
||||||
|
* @info: %TRUE to enable profile recording
|
||||||
|
*
|
||||||
|
* If set, vips will record profiling information, and dump it on program
|
||||||
|
* exit. These profiles can be analysed with the `vipsprofile` program.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
vips_profile_set( gboolean profile )
|
||||||
|
{
|
||||||
|
vips__thread_profile = profile;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
vips_thread_gate_block_save( VipsThreadGateBlock *block, FILE *fp )
|
vips_thread_gate_block_save( VipsThreadGateBlock *block, FILE *fp )
|
||||||
{
|
{
|
||||||
|
@ -379,6 +379,20 @@ static guint vips_image_signals[SIG_LAST] = { 0 };
|
|||||||
|
|
||||||
G_DEFINE_TYPE( VipsImage, vips_image, VIPS_TYPE_OBJECT );
|
G_DEFINE_TYPE( VipsImage, vips_image, VIPS_TYPE_OBJECT );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* vips_progress_set:
|
||||||
|
* @info: %TRUE to enable progress messages
|
||||||
|
*
|
||||||
|
* If set, vips will print messages about the progress of computation to
|
||||||
|
* stdout. This can also be enabled with the --vips-progress option, or by
|
||||||
|
* setting the environment variable VIPS_PROGRESS.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
vips_progress_set( gboolean progress )
|
||||||
|
{
|
||||||
|
vips__progress = progress;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
vips_image_delete( VipsImage *image )
|
vips_image_delete( VipsImage *image )
|
||||||
{
|
{
|
||||||
|
@ -313,7 +313,7 @@ vips_init( const char *argv0 )
|
|||||||
*/
|
*/
|
||||||
if( g_getenv( "VIPS_INFO" ) ||
|
if( g_getenv( "VIPS_INFO" ) ||
|
||||||
g_getenv( "IM_INFO" ) )
|
g_getenv( "IM_INFO" ) )
|
||||||
vips__info = 1;
|
vips_info_set( TRUE );
|
||||||
|
|
||||||
/* Register base vips types.
|
/* Register base vips types.
|
||||||
*/
|
*/
|
||||||
|
@ -88,7 +88,7 @@
|
|||||||
*/
|
*/
|
||||||
#define MAX_THREADS (1024)
|
#define MAX_THREADS (1024)
|
||||||
|
|
||||||
/* Default tile geometry ... can be set by init_world.
|
/* Default tile geometry ... can be set by vips_init().
|
||||||
*/
|
*/
|
||||||
int vips__tile_width = VIPS__TILE_WIDTH;
|
int vips__tile_width = VIPS__TILE_WIDTH;
|
||||||
int vips__tile_height = VIPS__TILE_HEIGHT;
|
int vips__tile_height = VIPS__TILE_HEIGHT;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user