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
This commit is contained in:
Andrew Murray 2025-05-27 09:12:43 +10:00 committed by GitHub
commit 0eef5e20ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -137,6 +137,7 @@ PyImaging_MapBuffer(PyObject *self, PyObject *args) {
}
}
im->read_only = view.readonly;
im->destroy = mapping_destroy_buffer;
Py_INCREF(target);