Skip to content

Commit e5d0945

Browse files
committed
improve power of two detection in openslideload
1 parent b21aab7 commit e5d0945

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## master
22

3+
- better power of two detection in openslideload
4+
5+
## 9.0.11 2025/07/21
6+
37
- fix path for Widget_pathname_item.action [MvGulik]
48
- add more draw compat definitions [MvGulik]
59
- better error / alert system

TODO

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
- About should show the linked libvips version
44

5+
- "merge column" in tab menu should show column captions
6+
57

68
- get judder with rotate and images smaller than the window
79

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
project('nip4', 'c',
22
# ie. a major after nip2 8.9 for workspace save file versioning
3-
version: '9.0.11',
3+
version: '9.0.12',
44
license: 'GPL',
55
meson_version: '>=0.64',
66
default_options: [

src/tilesource.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
/*
3131
#define DEBUG_VERBOSE
3232
#define DEBUG_MAKE
33-
#define DEBUG
3433
*/
34+
#define DEBUG
3535

3636
#include "nip4.h"
3737

@@ -1800,7 +1800,7 @@ tilesource_new_from_file(const char *filename)
18001800
tilesource->level_width[level];
18011801
double power = log(downsample) / log(2);
18021802

1803-
if (fabs(power - floor(power)) > 0.01) {
1803+
if (fabs(power - rint(power)) > 0.01) {
18041804
// too far away from a power of two, ignore any remaining
18051805
// frames
18061806
tilesource->level_count = level;

0 commit comments

Comments
 (0)