refer to example code
..
#get image data
image = Image.open(xxx)
image = image.convert('RGB')
#skip if image has one color
colors = image.getcolors(image.size[0]*image.size[1])
imgH = image.size[1]
imgW = image.size[0]
#print(f'img object w:{imgW}, h:{imgH}')
if len(colors) == 1:
continue
..
www.marearts.com
Thank you.
๐๐ป♂️
No comments:
Post a Comment