Compatibility to PIL, ERROR while save Image create from PIL.Image.Image object
Created originally on Bitbucket by AkySabre (Zhou Xiao)
#!python
from PIL import Image
from openpyxl.drawing.image import Image as xlImage
import openpyxl
a = Image.open("ok.jpg")
b = a.resize((200, 100), Image.ANTIALIAS)
c = xlImage("ok.jpg")
d = xlImage(a)
e = xlImage(b)
wb = openpyxl.load_workbook("aaa.xlsx")
ws = wb["Sheet1"]
ws.add_image(c, "A1") # ok. Work correctly
ws.add_image(d, "A1") # 1. nok. Just show a image placehoder with words "The picture can't be displayed."
ws.add_image(e, "A1") # 2. nok. AttributeError: 'Image' object has no attribute 'fp'
wb.save("bbb.xlsx")
wb.close()