Merge branch '7.38'
Conflicts: libvips/resample/affine.c
This commit is contained in:
commit
84d65c1727
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
scan
|
||||
compile
|
||||
po/*.pot
|
||||
test-driver
|
||||
vips-*.tar.gz
|
||||
|
@ -47,6 +47,7 @@
|
||||
Alessandro
|
||||
- fix a crash in vips_rawsave(), thanks Andrea
|
||||
- updated German translation, thanks Chris
|
||||
- fix coordinate error in affine, thanks ferryfax
|
||||
|
||||
24/2/14 started 7.38.5
|
||||
- jpeg load from buffer could write to input, thanks Lovell
|
||||
|
@ -106,14 +106,14 @@ typedef struct _VipsMax {
|
||||
/* The single max. Can be unset if, for example, the whole image is
|
||||
* NaN.
|
||||
*/
|
||||
double max;
|
||||
double out;
|
||||
int x;
|
||||
int y;
|
||||
|
||||
/* And the positions and values we found as VipsArrays for returning
|
||||
* to our caller.
|
||||
*/
|
||||
VipsArrayDouble *max_array;
|
||||
VipsArrayDouble *out_array;
|
||||
VipsArrayInt *x_array;
|
||||
VipsArrayInt *y_array;
|
||||
|
||||
@ -425,7 +425,7 @@ vips_max_class_init( VipsMaxClass *class )
|
||||
_( "Output" ),
|
||||
_( "Output value" ),
|
||||
VIPS_ARGUMENT_REQUIRED_OUTPUT,
|
||||
G_STRUCT_OFFSET( VipsMax, max ),
|
||||
G_STRUCT_OFFSET( VipsMax, out ),
|
||||
-INFINITY, INFINITY, 0.0 );
|
||||
|
||||
VIPS_ARG_INT( class, "x", 2,
|
||||
@ -453,7 +453,7 @@ vips_max_class_init( VipsMaxClass *class )
|
||||
_( "Output array" ),
|
||||
_( "Array of output values" ),
|
||||
VIPS_ARGUMENT_OPTIONAL_OUTPUT,
|
||||
G_STRUCT_OFFSET( VipsMax, max_array ),
|
||||
G_STRUCT_OFFSET( VipsMax, out_array ),
|
||||
VIPS_TYPE_ARRAY_DOUBLE );
|
||||
|
||||
VIPS_ARG_BOXED( class, "x_array", 7,
|
||||
|
@ -601,17 +601,18 @@ static void
|
||||
transform_array_int_g_string( const GValue *src_value, GValue *dest_value )
|
||||
{
|
||||
int n;
|
||||
int *array = vips_value_get_array_int( src_value, &n );
|
||||
int *array;
|
||||
|
||||
char txt[1024];
|
||||
VipsBuf buf = VIPS_BUF_STATIC( txt );
|
||||
int i;
|
||||
|
||||
for( i = 0; i < n; i++ )
|
||||
/* Use space as a separator since ',' may be a decimal point
|
||||
* in this locale.
|
||||
*/
|
||||
vips_buf_appendf( &buf, "%d ", array[i] );
|
||||
if( (array = vips_value_get_array_int( src_value, &n )) )
|
||||
for( i = 0; i < n; i++ )
|
||||
/* Use space as a separator since ',' may be a
|
||||
* decimal point in this locale.
|
||||
*/
|
||||
vips_buf_appendf( &buf, "%d ", array[i] );
|
||||
|
||||
g_value_set_string( dest_value, vips_buf_all( &buf ) );
|
||||
}
|
||||
@ -689,17 +690,18 @@ static void
|
||||
transform_array_double_g_string( const GValue *src_value, GValue *dest_value )
|
||||
{
|
||||
int n;
|
||||
double *array = vips_value_get_array_double( src_value, &n );
|
||||
double *array;
|
||||
|
||||
char txt[1024];
|
||||
VipsBuf buf = VIPS_BUF_STATIC( txt );
|
||||
int i;
|
||||
|
||||
for( i = 0; i < n; i++ )
|
||||
/* Use space as a separator since ',' may be a decimal point
|
||||
* in this locale.
|
||||
*/
|
||||
vips_buf_appendf( &buf, "%g ", array[i] );
|
||||
if( (array = vips_value_get_array_double( src_value, &n )) )
|
||||
for( i = 0; i < n; i++ )
|
||||
/* Use space as a separator since ',' may be a decimal
|
||||
* point in this locale.
|
||||
*/
|
||||
vips_buf_appendf( &buf, "%g ", array[i] );
|
||||
|
||||
g_value_set_string( dest_value, vips_buf_all( &buf ) );
|
||||
}
|
||||
@ -1064,7 +1066,8 @@ vips_value_get_array( const GValue *value,
|
||||
* vips_*_get_type().
|
||||
*/
|
||||
|
||||
area = g_value_get_boxed( value );
|
||||
if( !(area = g_value_get_boxed( value )) )
|
||||
return( NULL );
|
||||
if( n )
|
||||
*n = area->n;
|
||||
if( type )
|
||||
|
@ -355,9 +355,9 @@ vips_affine_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop )
|
||||
/* Clipping!
|
||||
*/
|
||||
if( fx < ile ||
|
||||
fx >= iri ||
|
||||
fx > iri ||
|
||||
fy < ito ||
|
||||
fy >= ibo ) {
|
||||
fy > ibo ) {
|
||||
for( z = 0; z < ps; z++ )
|
||||
q[z] = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user