mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
colour depth conversion fix
This commit is contained in:
parent
767202a4c3
commit
e0fbe6d27e
@ -103,7 +103,7 @@ def crop_black(img,tol=0):
|
||||
|
||||
def extractImageDataEmbed(image):
|
||||
d=3
|
||||
outarr = crop_black(np.array(image.getdata()).reshape(image.size[1],image.size[0],d ).astype(np.uint8) ) & 0x0F
|
||||
outarr = crop_black(np.array(image.convert('RGB').getdata()).reshape(image.size[1],image.size[0],d ).astype(np.uint8) ) & 0x0F
|
||||
blackCols = np.where( np.sum(outarr, axis=(0,2))==0)
|
||||
if blackCols[0].shape[0] < 2:
|
||||
print('No Image data blocks found.')
|
||||
|
Loading…
Reference in New Issue
Block a user