From 414b849aefeb338ceef2dc88dfb8a8f460a22f3b Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sat, 21 Nov 2020 14:23:58 +0000 Subject: [PATCH] reformat --- libvips/foreign/gifload.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libvips/foreign/gifload.c b/libvips/foreign/gifload.c index d7cc4975..73210a4c 100644 --- a/libvips/foreign/gifload.c +++ b/libvips/foreign/gifload.c @@ -701,13 +701,15 @@ static int vips_foreign_load_gif_set_header( VipsForeignLoadGif *gif, VipsImage *image ) { const gint64 total_height = (gint64) gif->file->SHeight * gif->n; - if ( total_height <= 0 || total_height > VIPS_MAX_COORD ) { - vips_error( "gifload", "%s", - _( "image size out of bounds" ) ); + + if( total_height <= 0 || + total_height > VIPS_MAX_COORD ) { + vips_error( "gifload", "%s", _( "image size out of bounds" ) ); return( -1 ); } + vips_image_init_fields( image, - gif->file->SWidth, (int) total_height, + gif->file->SWidth, total_height, (gif->has_colour ? 3 : 1) + (gif->has_transparency ? 1 : 0), VIPS_FORMAT_UCHAR, VIPS_CODING_NONE, gif->has_colour ?