Merge remote-tracking branch 'origin/master' into draw
This commit is contained in:
commit
7ef49c2f2d
@ -1,9 +1,13 @@
|
||||
21/1/14 started 7.39.0
|
||||
- auto-decode for (almost) all operations
|
||||
- auto-decode for (almost) all operations, see vips_image_decode()
|
||||
- background render thread cleans up and quits neatly
|
||||
- colourspace has a source_space option
|
||||
- operations can be tagged as "deprecated"
|
||||
|
||||
22/1/14 started 7.38.3
|
||||
- undeprecate VIPS_MASK_IDEAL_HIGHPASS and friends, ruby-vips was using them,
|
||||
thanks ahacking
|
||||
|
||||
22/1/14 started 7.38.2
|
||||
- auto RAD decode for affine
|
||||
- falsecolour was not working for some image types
|
||||
|
17
TODO
17
TODO
@ -1,21 +1,4 @@
|
||||
|
||||
- check_uncoded() left to do:
|
||||
|
||||
resample/quadratic.c
|
||||
|
||||
- move vips__image_decode() into the public API
|
||||
|
||||
- we vips_image_write() a lot, could we do this by
|
||||
|
||||
int
|
||||
vips_image_write( in, out )
|
||||
{
|
||||
g_object_ref( in)
|
||||
vips_object_local( out,in )
|
||||
}
|
||||
|
||||
i.e. do everything at pipe build time
|
||||
|
||||
- inplace
|
||||
|
||||
can we set a region for the pixels we will modify?
|
||||
|
@ -37,7 +37,7 @@ VIPS_VERSION_STRING=$VIPS_VERSION-`date`
|
||||
# binary interface changes not backwards compatible?: reset age to 0
|
||||
|
||||
LIBRARY_CURRENT=37
|
||||
LIBRARY_REVISION=1
|
||||
LIBRARY_REVISION=2
|
||||
LIBRARY_AGE=0
|
||||
|
||||
# patched into include/vips/version.h
|
||||
|
@ -539,7 +539,7 @@ vips_arithmetic_build( VipsObject *object )
|
||||
/* Decode RAD/LABQ etc.
|
||||
*/
|
||||
for( i = 0; i < arithmetic->n; i++ )
|
||||
if( vips__image_decode( arithmetic->in[i], &decode[i] ) )
|
||||
if( vips_image_decode( arithmetic->in[i], &decode[i] ) )
|
||||
return( -1 );
|
||||
|
||||
/* Cast our input images up to a common format, bands and size.
|
||||
|
@ -123,7 +123,7 @@ vips_statistic_build( VipsObject *object )
|
||||
|
||||
statistic->ready = statistic->in;
|
||||
|
||||
if( vips__image_decode( statistic->ready, &t[0] ) )
|
||||
if( vips_image_decode( statistic->ready, &t[0] ) )
|
||||
return( -1 );
|
||||
statistic->ready = t[0];
|
||||
|
||||
|
@ -628,13 +628,13 @@ vips_colour_difference_build( VipsObject *object )
|
||||
extra = NULL;
|
||||
|
||||
if( left ) {
|
||||
if( vips__image_decode( left, &t[0] ) )
|
||||
if( vips_image_decode( left, &t[0] ) )
|
||||
return( -1 );
|
||||
left = t[0];
|
||||
}
|
||||
|
||||
if( right ) {
|
||||
if( vips__image_decode( right, &t[1] ) )
|
||||
if( vips_image_decode( right, &t[1] ) )
|
||||
return( -1 );
|
||||
right = t[1];
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ vips_bandary_build( VipsObject *object )
|
||||
size = (VipsImage **) vips_object_local_array( object, bandary->n );
|
||||
|
||||
for( i = 0; i < bandary->n; i++ )
|
||||
if( vips__image_decode( bandary->in[i], &decode[i] ) )
|
||||
if( vips_image_decode( bandary->in[i], &decode[i] ) )
|
||||
return( -1 );
|
||||
if( vips__formatalike_vec( decode, format, bandary->n ) ||
|
||||
vips__sizealike_vec( format, size, bandary->n ) )
|
||||
|
@ -446,7 +446,7 @@ vips_cast_build( VipsObject *object )
|
||||
if( in->BandFmt == cast->format )
|
||||
return( vips_image_write( in, conversion->out ) );
|
||||
|
||||
if( vips__image_decode( in, &t[0] ) )
|
||||
if( vips_image_decode( in, &t[0] ) )
|
||||
return( -1 );
|
||||
in = t[0];
|
||||
|
||||
|
@ -349,7 +349,7 @@ vips_falsecolour_build( VipsObject *object )
|
||||
* want to work for images which aren't in a recognised space, like
|
||||
* MULTIBAND.
|
||||
*/
|
||||
if( vips__image_decode( falsecolour->in, &t[1] ) ||
|
||||
if( vips_image_decode( falsecolour->in, &t[1] ) ||
|
||||
vips_extract_band( t[1], &t[2], 0, NULL ) ||
|
||||
vips_cast( t[2], &t[3], VIPS_FORMAT_UCHAR, NULL ) ||
|
||||
vips_maplut( t[3], &t[4], t[0], NULL ) ||
|
||||
|
@ -311,7 +311,7 @@ vips_flatten_build( VipsObject *object )
|
||||
|
||||
in = flatten->in;
|
||||
|
||||
if( vips__image_decode( in, &t[0] ) )
|
||||
if( vips_image_decode( in, &t[0] ) )
|
||||
return( -1 );
|
||||
in = t[0];
|
||||
|
||||
|
@ -150,7 +150,7 @@ vips_recomb_build( VipsObject *object )
|
||||
|
||||
in = recomb->in;
|
||||
|
||||
if( vips__image_decode( in, &t[0] ) )
|
||||
if( vips_image_decode( in, &t[0] ) )
|
||||
return( -1 );
|
||||
in = t[0];
|
||||
|
||||
|
@ -94,7 +94,7 @@ vips_conv_build( VipsObject *object )
|
||||
|
||||
/* Unpack for processing.
|
||||
*/
|
||||
if( vips__image_decode( in, &t[0] ) )
|
||||
if( vips_image_decode( in, &t[0] ) )
|
||||
return( -1 );
|
||||
in = t[0];
|
||||
|
||||
|
@ -303,7 +303,7 @@ vips_fwfft_build( VipsObject *object )
|
||||
|
||||
in = freqfilt->in;
|
||||
|
||||
if( vips__image_decode( in, &t[0] ) )
|
||||
if( vips_image_decode( in, &t[0] ) )
|
||||
return( -1 );
|
||||
in = t[0];
|
||||
|
||||
|
@ -216,7 +216,7 @@ vips_invfft_build( VipsObject *object )
|
||||
|
||||
in = freqfilt->in;
|
||||
|
||||
if( vips__image_decode( in, &t[0] ) )
|
||||
if( vips_image_decode( in, &t[0] ) )
|
||||
return( -1 );
|
||||
in = t[0];
|
||||
|
||||
|
@ -236,7 +236,7 @@ vips_hist_local_build( VipsObject *object )
|
||||
|
||||
in = local->in;
|
||||
|
||||
if( vips__image_decode( in, &t[0] ) )
|
||||
if( vips_image_decode( in, &t[0] ) )
|
||||
return( -1 );
|
||||
in = t[0];
|
||||
|
||||
|
@ -143,7 +143,7 @@ vips_histogram_build( VipsObject *object )
|
||||
g_object_set( histogram, "out", vips_image_new(), NULL );
|
||||
|
||||
for( i = 0; i < histogram->n; i++ )
|
||||
if( vips__image_decode( histogram->in[i], &decode[i] ) ||
|
||||
if( vips_image_decode( histogram->in[i], &decode[i] ) ||
|
||||
vips_check_hist( class->nickname, decode[i] ) )
|
||||
return( -1 );
|
||||
|
||||
|
@ -224,7 +224,7 @@ vips_stdif_build( VipsObject *object )
|
||||
|
||||
in = stdif->in;
|
||||
|
||||
if( vips__image_decode( in, &t[0] ) )
|
||||
if( vips_image_decode( in, &t[0] ) )
|
||||
return( -1 );
|
||||
in = t[0];
|
||||
|
||||
|
@ -430,6 +430,8 @@ 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 *filename );
|
||||
|
||||
int vips_image_decode( VipsImage *in, VipsImage **out );
|
||||
|
||||
gboolean vips_image_isMSBfirst( VipsImage *image );
|
||||
gboolean vips_image_isfile( VipsImage *image );
|
||||
gboolean vips_image_ispartial( VipsImage *image );
|
||||
|
@ -298,8 +298,6 @@ IMAGE *vips__deprecated_open_write( const char *filename );
|
||||
|
||||
int vips__input_interpolate_init( im_object *obj, char *str );
|
||||
|
||||
int vips__image_decode( VipsImage *in, VipsImage **out );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /*__cplusplus*/
|
||||
|
@ -962,6 +962,28 @@ typedef enum {
|
||||
IM_MASK_FRACTAL_FLT = 18
|
||||
} ImMaskType;
|
||||
|
||||
/* We had them in the VIPS namespace for a while before deprecating them.
|
||||
*/
|
||||
#define VIPS_MASK_IDEAL_HIGHPASS IM_MASK_IDEAL_HIGHPASS
|
||||
#define VIPS_MASK_IDEAL_LOWPASS IM_MASK_IDEAL_LOWPASS
|
||||
#define VIPS_MASK_BUTTERWORTH_HIGHPASS IM_MASK_BUTTERWORTH_HIGHPASS
|
||||
#define VIPS_MASK_BUTTERWORTH_LOWPASS IM_MASK_BUTTERWORTH_LOWPASS
|
||||
#define VIPS_MASK_GAUSS_HIGHPASS IM_MASK_GAUSS_HIGHPASS
|
||||
#define VIPS_MASK_GAUSS_LOWPASS IM_MASK_GAUSS_LOWPASS
|
||||
#define VIPS_MASK_IDEAL_RINGPASS IM_MASK_IDEAL_RINGPASS
|
||||
#define VIPS_MASK_IDEAL_RINGREJECT IM_MASK_IDEAL_RINGREJECT
|
||||
#define VIPS_MASK_BUTTERWORTH_RINGPASS IM_MASK_BUTTERWORTH_RINGPASS
|
||||
#define VIPS_MASK_BUTTERWORTH_RINGREJECT IM_MASK_BUTTERWORTH_RINGREJECT
|
||||
#define VIPS_MASK_GAUSS_RINGPASS IM_MASK_GAUSS_RINGPASS
|
||||
#define VIPS_MASK_GAUSS_RINGREJECT IM_MASK_GAUSS_RINGREJECT
|
||||
#define VIPS_MASK_IDEAL_BANDPASS IM_MASK_IDEAL_BANDPASS
|
||||
#define VIPS_MASK_IDEAL_BANDREJECT IM_MASK_IDEAL_BANDREJECT
|
||||
#define VIPS_MASK_BUTTERWORTH_BANDPASS IM_MASK_BUTTERWORTH_BANDPASS
|
||||
#define VIPS_MASK_BUTTERWORTH_BANDREJECT IM_MASK_BUTTERWORTH_BANDREJECT
|
||||
#define VIPS_MASK_GAUSS_BANDPASS IM_MASK_GAUSS_BANDPASS
|
||||
#define VIPS_MASK_GAUSS_BANDREJECT IM_MASK_GAUSS_BANDREJECT
|
||||
#define VIPS_MASK_FRACTAL_FLT IM_MASK_FRACTAL_FLT
|
||||
|
||||
int im_flt_image_freq( VipsImage *in, VipsImage *out, ImMaskType flag, ... );
|
||||
int im_create_fmask( VipsImage *out,
|
||||
int xsize, int ysize, ImMaskType flag, ... );
|
||||
|
@ -1997,6 +1997,37 @@ vips_image_write_to_file( VipsImage *image, const char *filename )
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/**
|
||||
* vips_image_decode:
|
||||
* @in: image to decode
|
||||
* @out: write to this image
|
||||
*
|
||||
* A convenience function to unpack to a format that we can compute with.
|
||||
* @out->Coding is always VIPS_CODING_NONE.
|
||||
*
|
||||
* See also: vips_LabQ2LabS(), vips_rad2float().
|
||||
*
|
||||
* Returns: 0 on success, or -1 on error.
|
||||
*/
|
||||
int
|
||||
vips_image_decode( VipsImage *in, VipsImage **out )
|
||||
{
|
||||
if( in->Coding == VIPS_CODING_LABQ ) {
|
||||
if( vips_LabQ2LabS( in, out, NULL ) )
|
||||
return( -1 );
|
||||
}
|
||||
else if( in->Coding == VIPS_CODING_RAD ) {
|
||||
if( vips_rad2float( in, out, NULL ) )
|
||||
return( -1 );
|
||||
}
|
||||
else {
|
||||
if( vips_copy( in, out, NULL ) )
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/**
|
||||
* vips_image_isMSBfirst:
|
||||
* @image: image to test
|
||||
|
@ -93,7 +93,7 @@ vips_morph_build( VipsObject *object )
|
||||
|
||||
in = morphology->in;
|
||||
|
||||
if( vips__image_decode( in, &t[0] ) )
|
||||
if( vips_image_decode( in, &t[0] ) )
|
||||
return( -1 );
|
||||
in = t[0];
|
||||
|
||||
|
@ -341,7 +341,7 @@ vips_rank_build( VipsObject *object )
|
||||
|
||||
in = morphology->in;
|
||||
|
||||
if( vips__image_decode( in, &t[0] ) )
|
||||
if( vips_image_decode( in, &t[0] ) )
|
||||
return( -1 );
|
||||
in = t[0];
|
||||
|
||||
|
@ -375,27 +375,6 @@ vips_affine_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop )
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/* Unpack to a format that we can compute with.
|
||||
*/
|
||||
int
|
||||
vips__image_decode( VipsImage *in, VipsImage **out )
|
||||
{
|
||||
if( in->Coding == VIPS_CODING_LABQ ) {
|
||||
if( vips_LabQ2LabS( in, out, NULL ) )
|
||||
return( -1 );
|
||||
}
|
||||
else if( in->Coding == VIPS_CODING_RAD ) {
|
||||
if( vips_rad2float( in, out, NULL ) )
|
||||
return( -1 );
|
||||
}
|
||||
else {
|
||||
if( vips_copy( in, out, NULL ) )
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
static int
|
||||
vips_affine_build( VipsObject *object )
|
||||
{
|
||||
@ -485,7 +464,7 @@ vips_affine_build( VipsObject *object )
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
if( vips__image_decode( in, &t[0] ) )
|
||||
if( vips_image_decode( in, &t[0] ) )
|
||||
return( -1 );
|
||||
in = t[0];
|
||||
|
||||
|
@ -347,7 +347,7 @@ vips_shrink_build( VipsObject *object )
|
||||
|
||||
/* Unpack for processing.
|
||||
*/
|
||||
if( vips__image_decode( in, &t[0] ) )
|
||||
if( vips_image_decode( in, &t[0] ) )
|
||||
return( -1 );
|
||||
in = t[0];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user