small fixes

This commit is contained in:
John Cupitt 2017-01-06 14:01:55 +00:00
parent 2fa3736722
commit ec79682215
2 changed files with 14 additions and 6 deletions

View File

@ -40,10 +40,16 @@ Set the output thumbnail size to
.B N
x
.B N
pixels. You can use MxN to specify a rectangular bounding box.
pixels.
You can use "MxN" to specify a rectangular bounding box.
The image is shrunk so that it just fits within this area, images
which are smaller than this are expanded. Use "xN" or "Mx" to just resize on
one axis. Append "<" to only resize if the input image is smaller than the
which are smaller than this are expanded.
Use "xN" or "Mx" to just resize on
one axis.
Append "<" to only resize if the input image is smaller than the
target, append ">" to only resize if the input image is larger than the target.
.TP
@ -52,7 +58,8 @@ Set the output format string. The input filename has any file type suffix
removed, then that value is substitued into
.B FORMAT
replacing
.B %s. If
.B %s.
If
.B FORMAT
is a relative path, the name of the input directory is prepended. In other
words, any path in

View File

@ -265,7 +265,7 @@ fetch_match( GMatchInfo *match_info, int n )
{
const char *str = g_match_info_fetch( match_info, n );
return( strcmp( str, "" ) == 0 ? NULL : str );
return( str && strcmp( str, "" ) == 0 ? NULL : str );
}
/* Parse a geometry string and set thumbnail_width and thumbnail_height.
@ -392,7 +392,8 @@ main( int argc, char **argv )
g_option_context_free( context );
if( thumbnail_parse_geometry( thumbnail_size ) )
if( thumbnail_size &&
thumbnail_parse_geometry( thumbnail_size ) )
vips_error_exit( NULL );
#ifndef HAVE_EXIF