@@ -1464,7 +1464,7 @@ static void _init_8(uint8_t *buf,
14641464 uint8_t * tmp = 0 ;
14651465 int32_t thumb_width , thumb_height ;
14661466 res = dt_imageio_large_thumbnail (filename , & tmp , & thumb_width , & thumb_height , color_space );
1467- if (! res )
1467+ if (res )
14681468 {
14691469 // if the thumbnail is not large enough, we compute one
14701470 const dt_image_t * img2 = dt_image_cache_get (darktable .image_cache , imgid , 'r' );
@@ -1528,10 +1528,11 @@ static void _init_8(uint8_t *buf,
15281528 // export with flags: ignore exif(don't load from disk), don't
15291529 // swap byte order, don't do hq processing, no upscaling and
15301530 // signal we want thumbnail export
1531- res = dt_imageio_export_with_flags (imgid , "unused" , & format , (dt_imageio_module_data_t * )& dat , TRUE, FALSE, FALSE,
1532- FALSE, FALSE, TRUE, NULL , FALSE, FALSE, DT_COLORSPACE_NONE , NULL , DT_INTENT_LAST , NULL ,
1533- NULL , 1 , 1 , NULL , -1 );
1534- if (!res )
1531+ res = dt_imageio_export_with_flags
1532+ (imgid , "unused" , & format , (dt_imageio_module_data_t * )& dat , TRUE, FALSE, FALSE,
1533+ FALSE, FALSE, TRUE, NULL , FALSE, FALSE, DT_COLORSPACE_NONE , NULL , DT_INTENT_LAST ,
1534+ NULL , NULL , 1 , 1 , NULL , -1 );
1535+ if (res )
15351536 {
15361537 dt_print (DT_DEBUG_CACHE ,
15371538 "[mipmap_cache] generate mip %d for ID=%d from scratch\n" ,
@@ -1548,7 +1549,7 @@ static void _init_8(uint8_t *buf,
15481549 // dat.head.width, dat.head.height);
15491550
15501551 // any errors?
1551- if (res )
1552+ if (! res )
15521553 {
15531554 // dt_print(DT_DEBUG_ALWAYS, "[mipmap_cache] could not process thumbnail!\n");
15541555 * width = * height = 0 ;
0 commit comments