add changelog notes
and linewrap for 80 column limit
This commit is contained in:
parent
894ed1cb13
commit
cdcafbc4c5
@ -19,6 +19,10 @@
|
||||
- deprecate "properties" option to dzsave (now always on)
|
||||
- always set the min stack size for pthreads, if we can
|
||||
- add fail-on to thumbnail
|
||||
- add "gap" option to vips_reduce[hv]() and vips_resize() [kleisauke]
|
||||
- add "ceil" option to vips_shrink() [kleisauke]
|
||||
- quality improvements for image resizing [kleisauke]
|
||||
|
||||
|
||||
26/11/21 started 8.12.3
|
||||
- better arg checking for hist_find_ndim [travisbell]
|
||||
|
@ -138,7 +138,7 @@
|
||||
typedef struct _VipsReduce {
|
||||
VipsResample parent_instance;
|
||||
|
||||
double hshrink; /* Shrink factors */
|
||||
double hshrink; /* Shrink factors */
|
||||
double vshrink;
|
||||
double gap; /* Reduce gap */
|
||||
|
||||
|
@ -65,7 +65,7 @@
|
||||
typedef struct _VipsReduceh {
|
||||
VipsResample parent_instance;
|
||||
|
||||
double hshrink; /* Reduce factor */
|
||||
double hshrink; /* Reduce factor */
|
||||
double gap; /* Reduce gap */
|
||||
|
||||
/* The thing we use to make the kernel.
|
||||
@ -477,8 +477,8 @@ vips_reduceh_build( VipsObject *object )
|
||||
|
||||
/* The int part of our reduce.
|
||||
*/
|
||||
int_hshrink = VIPS_MAX( 1,
|
||||
VIPS_FLOOR( (double) in->Xsize / width / reduceh->gap ) );
|
||||
int_hshrink = VIPS_MAX( 1, VIPS_FLOOR(
|
||||
(double) in->Xsize / width / reduceh->gap ) );
|
||||
|
||||
if( int_hshrink > 1 ) {
|
||||
g_info( "shrinkh by %d", int_hshrink );
|
||||
|
@ -105,7 +105,7 @@ typedef struct _VipsReducev {
|
||||
VipsResample parent_instance;
|
||||
|
||||
double vshrink; /* Reduce factor */
|
||||
double gap; /* Reduce gap */
|
||||
double gap; /* Reduce gap */
|
||||
|
||||
/* The thing we use to make the kernel.
|
||||
*/
|
||||
@ -846,8 +846,8 @@ vips_reducev_build( VipsObject *object )
|
||||
|
||||
/* The int part of our reduce.
|
||||
*/
|
||||
int_vshrink = VIPS_MAX( 1,
|
||||
VIPS_FLOOR( (double) in->Ysize / height / reducev->gap ) );
|
||||
int_vshrink = VIPS_MAX( 1, VIPS_FLOOR(
|
||||
(double) in->Ysize / height / reducev->gap ) );
|
||||
|
||||
if( int_vshrink > 1 ) {
|
||||
g_info( "shrinkv by %d", int_vshrink );
|
||||
|
@ -178,10 +178,12 @@ vips_resize_build( VipsObject *object )
|
||||
target_width = VIPS_ROUND_UINT( in->Xsize * hscale );
|
||||
target_height = VIPS_ROUND_UINT( in->Ysize * vscale );
|
||||
|
||||
int_hshrink =
|
||||
VIPS_FLOOR( (double) in->Xsize / target_width / resize->gap );
|
||||
int_vshrink =
|
||||
VIPS_FLOOR( (double) in->Ysize / target_height / resize->gap );
|
||||
int_hshrink = VIPS_FLOOR(
|
||||
(double) in->Xsize / target_width /
|
||||
resize->gap );
|
||||
int_vshrink = VIPS_FLOOR(
|
||||
(double) in->Ysize / target_height /
|
||||
resize->gap );
|
||||
}
|
||||
|
||||
int_hshrink = VIPS_MAX( 1, int_hshrink );
|
||||
|
@ -65,7 +65,7 @@ typedef struct _VipsShrink {
|
||||
|
||||
double hshrink; /* Shrink factors */
|
||||
double vshrink;
|
||||
gboolean ceil; /* Round operation */
|
||||
gboolean ceil; /* Round operation */
|
||||
|
||||
} VipsShrink;
|
||||
|
||||
@ -95,21 +95,21 @@ vips_shrink_build( VipsObject *object )
|
||||
/* Shrink by int factors, reduce to final size.
|
||||
*/
|
||||
if( vips_reducev( resample->in, &t[0], shrink->vshrink,
|
||||
"gap", 1.0,
|
||||
NULL ) ||
|
||||
"gap", 1.0,
|
||||
NULL ) ||
|
||||
vips_reduceh( t[0], &t[1], shrink->hshrink,
|
||||
"gap", 1.0,
|
||||
NULL ) ||
|
||||
"gap", 1.0,
|
||||
NULL ) ||
|
||||
vips_image_write( t[1], resample->out ) )
|
||||
return( -1 );
|
||||
}
|
||||
else {
|
||||
if( vips_shrinkv( resample->in, &t[0], shrink->vshrink,
|
||||
"ceil", shrink->ceil,
|
||||
NULL ) ||
|
||||
"ceil", shrink->ceil,
|
||||
NULL ) ||
|
||||
vips_shrinkh( t[0], &t[1], shrink->hshrink,
|
||||
"ceil", shrink->ceil,
|
||||
NULL ) ||
|
||||
"ceil", shrink->ceil,
|
||||
NULL ) ||
|
||||
vips_image_write( t[1], resample->out ) )
|
||||
return( -1 );
|
||||
}
|
||||
|
@ -278,7 +278,8 @@ vips_shrinkh_build( VipsObject *object )
|
||||
*/
|
||||
resample->out->Xsize = shrink->ceil ?
|
||||
VIPS_CEIL( (double) resample->in->Xsize / shrink->hshrink ) :
|
||||
VIPS_ROUND_UINT( (double) resample->in->Xsize / shrink->hshrink );
|
||||
VIPS_ROUND_UINT(
|
||||
(double) resample->in->Xsize / shrink->hshrink );
|
||||
if( resample->out->Xsize <= 0 ) {
|
||||
vips_error( class->nickname,
|
||||
"%s", _( "image has shrunk to nothing" ) );
|
||||
|
@ -383,7 +383,8 @@ vips_shrinkv_build( VipsObject *object )
|
||||
*/
|
||||
t[2]->Ysize = shrink->ceil ?
|
||||
VIPS_CEIL( (double) resample->in->Ysize / shrink->vshrink ) :
|
||||
VIPS_ROUND_UINT( (double) resample->in->Ysize / shrink->vshrink );
|
||||
VIPS_ROUND_UINT(
|
||||
(double) resample->in->Ysize / shrink->vshrink );
|
||||
if( t[2]->Ysize <= 0 ) {
|
||||
vips_error( class->nickname,
|
||||
"%s", _( "image has shrunk to nothing" ) );
|
||||
|
Loading…
Reference in New Issue
Block a user