Closed wiredfool closed 9 years ago
Given that the sane snap code needs to be overhauled for #4, I think one could even take the chance to make the C code Pillow and numpy agnostic by simply reading the image data into a generic memory buffer, and then using PIL.Image.frombuffer
resp. something like numpy.frombuffer
from the Python code to return an object of the appropriate type.
This is now done.
@manisandro Please note that this is untested. I don't have the hardware for it.
This PR removes the compile time dependency on the Pillow headers, replacing it with a stub struct that contains the portions of the image object that were used in _sane.c. The strict is filled using the same mechanism that Pillow uses to get pointers for the cffi based PyAccess module.