Commit df6d0d92 authored by DepFA's avatar DepFA Committed by GitHub

convert back to rgb as some hosts add alpha

parent 707a4311
......@@ -64,7 +64,7 @@ def crop_black(img,tol=0):
def extractImageDataFooter(image):
d=3
outarr = crop_black(np.array(image.getdata()).reshape(image.size[1],image.size[0],d ).astype(np.uint8) )
outarr = crop_black(np.array(image.convert('RGB').getdata()).reshape(image.size[1],image.size[0],d ).astype(np.uint8) )
lastRow = np.where( np.sum(outarr, axis=(1,2))==0)
if lastRow[0].shape[0] == 0:
print('Image data block not found.')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment