Skip to content

Commit 0eef5e2

Browse files
authored
Merge pull request #29 from wiredfool/tiff_mmap
Mark the image read-only in the C layer if it's created from a read only buffer
2 parents 041acf1 + eff667a commit 0eef5e2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/map.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ PyImaging_MapBuffer(PyObject *self, PyObject *args) {
137137
}
138138
}
139139

140+
im->read_only = view.readonly;
140141
im->destroy = mapping_destroy_buffer;
141142

142143
Py_INCREF(target);

0 commit comments

Comments
 (0)