revise formatting

This commit is contained in:
John Cupitt 2022-10-12 18:27:10 +01:00
parent ab2e0bf38c
commit b661f4bc27

View File

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