File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8+ ## [ 0.6.1] - 2026-01-23
9+
10+ - Fix memory leak in ` imwrite_to_memory() ` . The codestream and memory outfile are now
11+ properly closed after encoding.
12+
13+
14+
815## [ 0.6.0] - 2026-01-22
916
1017- Provide a new method ` get_level_shape ` to help get the shape after decoding for
Original file line number Diff line number Diff line change @@ -57,7 +57,10 @@ def imwrite_to_memory(
5757 tileparts_at_resolutions = tileparts_at_resolutions ,
5858 tileparts_at_components = tileparts_at_components ,
5959 )
60- return np .asarray (CompressedData (mem_outfile , codestream ))
60+ data = bytes (mem_outfile .get_data ())
61+ codestream .close ()
62+ mem_outfile .close ()
63+ return np .frombuffer (data , dtype = np .uint8 )
6164
6265
6366def imwrite (
You can’t perform that action at this time.
0 commit comments