revise formatting

This commit is contained in:
John Cupitt 2022-10-12 18:27:10 +01:00
parent ab2e0bf38c
commit b661f4bc27
1 changed files with 16 additions and 12 deletions

View File

@ -488,23 +488,27 @@ vips_foreign_load_nsgif_generate( VipsRegion *or,
}
int
vips_foreign_load_nsgif_tile_height(VipsForeignLoadNsgif *gif) {
int i;
vips_foreign_load_nsgif_tile_height( VipsForeignLoadNsgif *gif )
{
int height = gif->info->height;
// First, check the perfect size
if (height % 16 == 0)
return 16;
int i;
// Next, check larger and smaller sizes
for (i = 1; i < 16; i++) {
if (height % (16 + i) == 0)
return (16 + i);
if (height % (16 - i) == 0)
return (16 - i);
/* First, check the perfect size.
*/
if( height % 16 == 0 )
return( 16 );
/* Next, check larger and smaller sizes.
*/
for( i = 1; i < 16; i++ ) {
if( height % (16 + i) == 0 )
return( 16 + i );
if( height % (16 - i) == 0 )
return( 16 - i );
}
return 1;
return( 1 );
}
static int