Skip to content

Commit 47e2cfe

Browse files
committed
openslide.lowlevel: Simplify read_associated_image()
1 parent f27ce51 commit 47e2cfe

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

openslide/lowlevel.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,7 @@ def get_associated_image_dimensions(slide, name):
193193
_read_associated_image = _func('openslide_read_associated_image', None,
194194
[_OpenSlide, c_char_p, POINTER(c_uint32)])
195195
def read_associated_image(slide, name):
196-
w, h = c_int64(), c_int64()
197-
_get_associated_image_dimensions(slide, name, byref(w), byref(h))
198-
buf = (w.value * h.value * c_uint32)()
196+
w, h = get_associated_image_dimensions(slide, name)
197+
buf = (w * h * c_uint32)()
199198
_read_associated_image(slide, name, buf)
200-
return _load_image(buf, (w.value, h.value))
199+
return _load_image(buf, (w, h))

0 commit comments

Comments
 (0)