Skip to content

Commit

Permalink
Compress depth maps (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
pablospe authored Mar 1, 2024
1 parent 4314382 commit 673f480
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scantools/utils/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def write_depth(path: Path, depth: np.ndarray):
mask = (depth > np.iinfo(dtype).max) | (depth < 0)
depth[mask] = 0 # avoid overflow
im = PIL.Image.fromarray(depth.round().astype(dtype))
im.save(path)
im.save(path, format='PNG', compress_level=9)


try:
Expand Down

0 comments on commit 673f480

Please sign in to comment.