Commit 72450ef5 by sikang

update

parent 3dea1f00
......@@ -63,7 +63,7 @@ class ImageGarble:
def __create_img(self, imgPath):
size = len(self.__colors)
image = Image.new('RGBA', (random.randint(1, 50), random.randint(
1, 10)), self.__colors[random.randint(0, size-1)])
1, 50)), self.__colors[random.randint(0, size-1)])
image.save(imgPath, quality=10)
def img_garble(self, config):
......@@ -77,7 +77,9 @@ class ImageGarble:
#最多500张
if count > 500:
return
count += 1
# img_path = "/Users/connor/Documents/apks/imgs/%s.png"%self.__gen_rand_str()
# self.__create_img(img_path)
self.__create_img("%s/%s.png"%(root,self.__gen_rand_str()))
count += 1
print("done")
print("已生成%d张图片"% count)
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