Skip to content

Commit cf05303

Browse files
committed
fix TIFF pyr detection
see #54 thanks euzada
1 parent a203e7d commit cf05303

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ master
22

33
- do our own tile snapping if gtk has no snap mechanism
44
- high-dpi support
5+
- fix TIFF pyr detection [euzada]
56

67
## 4.1.0 26/07/25
78

src/tilesource.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,8 +1409,7 @@ tilesource_print(Tilesource *tilesource)
14091409
int i;
14101410

14111411
printf("tilesource: %p\n", tilesource);
1412-
printf("\ttype = %s\n",
1413-
vips_enum_nick(TILESOURCE_TYPE_TYPE, tilesource->type));
1412+
printf("\ttype = %s\n", vips_enum_nick(TYPE_TYPE, tilesource->type));
14141413
printf("\tloader = %s\n", tilesource->loader);
14151414
printf("\tn_pages = %d\n", tilesource->n_pages);
14161415
printf("\tpage_height = %d\n", tilesource->page_height);
@@ -1431,7 +1430,7 @@ tilesource_print(Tilesource *tilesource)
14311430
tilesource->level_height[i]);
14321431

14331432
printf("\tmode = %s\n",
1434-
vips_enum_nick(TILESOURCE_MODE_TYPE, tilesource->mode));
1433+
vips_enum_nick(TYPE_MODE, tilesource->mode));
14351434
}
14361435
#endif /*DEBUG*/
14371436

@@ -1448,8 +1447,6 @@ tilesource_set_base(Tilesource *tilesource, VipsImage *base)
14481447
tilesource->base = base;
14491448
g_object_ref(tilesource->base);
14501449

1451-
tilesource->n_subifds = vips_image_get_n_subifds(base);
1452-
14531450
if (vips_image_get_typeof(base, "delay")) {
14541451
int *delay;
14551452
int n_delay;
@@ -1719,6 +1716,7 @@ tilesource_new_from_file(const char *filename)
17191716
return NULL;
17201717

17211718
tilesource->n_subifds = vips_image_get_n_subifds(plain);
1719+
tilesource->n_pages = vips_image_get_n_pages(plain);
17221720

17231721
/* For openslide, we can read out the level structure directly.
17241722
*/
@@ -2050,7 +2048,6 @@ tilesource_set_synchronous(Tilesource *tilesource, gboolean synchronous)
20502048
if (tilesource->synchronous != synchronous) {
20512049
#ifdef DEBUG
20522050
printf("tilesource_set_synchronous: %d", synchronous);
2053-
iobject_print(IOBJECT(tilesource));
20542051
#endif /*DEBUG*/
20552052

20562053
tilesource->synchronous = synchronous;

0 commit comments

Comments
 (0)