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