Skip to content

Commit 1ea748a

Browse files
Increase buffer size and use byte type
Keeping the same size but with the correct type doesn't seem to work.
1 parent 1d857eb commit 1ea748a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

isyntax2raw/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,9 +738,12 @@ def write_tile(
738738
)
739739
height = int(height)
740740
pixel_buffer_size = width * height * 3
741+
if self.bits_per_pixel is not None:
742+
pixel_buffer_size = pixel_buffer_size * (self.bits_per_pixel / 8)
743+
741744
pixels = np.empty(
742745
pixel_buffer_size,
743-
dtype=self.get_data_type(self.bits_per_pixel)
746+
dtype='B'
744747
)
745748
patch_id = patch_ids.pop(regions.index(region))
746749
x_start, y_start = patch_id

0 commit comments

Comments
 (0)