Hi guys!
As posted here I’m desperately trying to write 16bit/channel images using GHPython. There would be no problem if System.Drawing had correctly implemented the method to save 16bit/channel images…but that is not the case (please read the linked post for more details).
I’m trying to avoid a big workaround trying to use Pillow in GHPython but I got no luck. I’ve properly installed Pillow in my python 2.7 distribution and it worked find in console (importing the module and using it), the problem comes when importing it in GHPython:
from PIL import Image
im = Image.open("C:\R.jpg")
## print im.format, im.size, im.mode
im2 = Image.new("RGB", (512, 512), "white")
im2.save("G:\A.jpg")
This gives me:
Runtime error (ImportException): cannot import _imaging from PIL
I’ve double checked: I’m running Rhino 5 32bits, Python 2.7 32bits and the installed Pillow library is 32bit.
Has anyone try to get Pillow working? If the answer is yes: did you succeed? I would be open to a .NET library that writes 16bit/channel images…after all, I could use some VB.NET/C# code to the image creation process and Python for the rest.
Thanks in advance.
Ángel.
Sevilla, Spain.