Fixed indexed PNG issues
This commit is contained in:
parent
ad3c7f0c34
commit
8178240120
7
cloud.py
7
cloud.py
|
@ -51,9 +51,8 @@ if args.N is None:
|
||||||
|
|
||||||
def fetch_comments(comment) -> list:
|
def fetch_comments(comment) -> list:
|
||||||
if len(comment.replies) == 0:
|
if len(comment.replies) == 0:
|
||||||
c = re.sub(r'https?://\S+', '', comment.body)
|
c = re.sub(r'(\[text\]\()?https?://[0-9A-Za-z/\?#\[\]@\.!$\&%\-+,;=]+\)?', '', comment.body)
|
||||||
c = re.sub(r'http?://\S+', '', c)
|
return [re.sub(r'https?://[0-9A-Za-z/\?#\[\]@\.!$\&%\-+,;=]+', '', c)]
|
||||||
return [c]
|
|
||||||
|
|
||||||
raw_comments = [comment.body]
|
raw_comments = [comment.body]
|
||||||
|
|
||||||
|
@ -95,7 +94,7 @@ mask = None
|
||||||
colors = None
|
colors = None
|
||||||
if args.m is not None:
|
if args.m is not None:
|
||||||
print("Creating mask...", end=" ", flush=True)
|
print("Creating mask...", end=" ", flush=True)
|
||||||
mask = np.array(Image.open(args.m))
|
mask = np.array(Image.open(args.m).convert("RGB"))
|
||||||
colors = ImageColorGenerator(mask)
|
colors = ImageColorGenerator(mask)
|
||||||
print("Done!")
|
print("Done!")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue