@@ -153,7 +153,7 @@ gboolean dt_imageio_large_thumbnail(const char *filename,
153153 int32_t * height ,
154154 dt_colorspaces_color_profile_type_t * color_space )
155155{
156- int res = TRUE ;
156+ int res = FALSE ;
157157
158158 uint8_t * buf = NULL ;
159159 char * mime_type = NULL ;
@@ -185,7 +185,7 @@ gboolean dt_imageio_large_thumbnail(const char *filename,
185185 goto error ;
186186 }
187187
188- res = FALSE ;
188+ res = TRUE ;
189189 }
190190 else
191191 {
@@ -236,13 +236,13 @@ gboolean dt_imageio_large_thumbnail(const char *filename,
236236 }
237237 }
238238
239- res = FALSE ;
239+ res = TRUE ;
240240
241241 error_gm :
242242 if (image ) DestroyImage (image );
243243 if (image_info ) DestroyImageInfo (image_info );
244244 DestroyExceptionInfo (& exception );
245- if (res ) goto error ;
245+ if (! res ) goto error ;
246246#elif defined HAVE_IMAGEMAGICK
247247 MagickWand * image = NULL ;
248248 MagickBooleanType mret ;
@@ -287,11 +287,11 @@ gboolean dt_imageio_large_thumbnail(const char *filename,
287287 goto error_im ;
288288 }
289289
290- res = FALSE ;
290+ res = TRUE ;
291291
292292error_im :
293293 DestroyMagickWand (image );
294- if (res ) goto error ;
294+ if (! res ) goto error ;
295295#else
296296 dt_print (DT_DEBUG_ALWAYS ,
297297 "[dt_imageio_large_thumbnail] error: The thumbnail image is not in "
@@ -301,7 +301,7 @@ gboolean dt_imageio_large_thumbnail(const char *filename,
301301#endif
302302 }
303303
304- if (res )
304+ if (! res )
305305 {
306306 dt_print (DT_DEBUG_ALWAYS ,
307307 "[dt_imageio_large_thumbnail] error: Not a supported thumbnail "
@@ -706,9 +706,9 @@ gboolean dt_imageio_export(const dt_imgid_t imgid,
706706{
707707 if (strcmp (format -> mime (format_params ), "x-copy" ) == 0 )
708708 /* This is a just a copy, skip process and just export */
709- return ( format -> write_image (format_params , filename , NULL , icc_type ,
709+ return format -> write_image (format_params , filename , NULL , icc_type ,
710710 icc_filename , NULL , 0 , imgid , num , total , NULL ,
711- export_masks )) ! = 0 ;
711+ export_masks ) = = 0 ;
712712 else
713713 {
714714 const gboolean is_scaling =
@@ -1184,20 +1184,20 @@ gboolean dt_imageio_export_with_flags(const dt_imgid_t imgid,
11841184 const int length = dt_exif_read_blob (& exif_profile , pathname , imgid , sRGB ,
11851185 processed_width , processed_height , FALSE);
11861186
1187- res = ( format -> write_image (format_params , filename , outbuf , icc_type ,
1187+ res = format -> write_image (format_params , filename , outbuf , icc_type ,
11881188 icc_filename , exif_profile , length , imgid ,
1189- num , total , & pipe , export_masks )) ! = 0 ;
1189+ num , total , & pipe , export_masks ) = = 0 ;
11901190
11911191 free (exif_profile );
11921192 }
11931193 else
11941194 {
1195- res = ( format -> write_image (format_params , filename , outbuf , icc_type ,
1195+ res = format -> write_image (format_params , filename , outbuf , icc_type ,
11961196 icc_filename , NULL , 0 , imgid , num , total ,
1197- & pipe , export_masks )) ! = 0 ;
1197+ & pipe , export_masks ) = = 0 ;
11981198 }
11991199
1200- if (res )
1200+ if (! res )
12011201 goto error ;
12021202
12031203 /* now write xmp into that container, if possible */
0 commit comments