[#6255] change to work with either PIL or Pillow
[#6255] switch dependencies from PIL to Pillow