bpy and PIL / Pillow crash
I am using Pillow successfully on MacOSX but maybe not in the cleanest way.

In a nutshell, I'm using Blender's own python34 and I add a path to the proper version of Pillow in my script


Download Pillow for python34 and extract it in a folder – on MacOS, macport &amp; pip automatically take care of that for me
Take the path to Pillow within that folder
In your python script before you import Pillow, add the code below


Python

import sys
path_to_pillow = 'C:/somewhere_on_your_disk/pillow/'
sys.path.append(path_to_pillow)
from PIL import Image


I'll try to run your code and see if it works on my side.

Could you copy the error you're getting when using PIL with Blender ?