Change the way of reading image to HTTPS
This commit is contained in:
8
core.py
8
core.py
@@ -6,6 +6,8 @@ import shutil
|
||||
import platform
|
||||
|
||||
from PIL import Image
|
||||
from io import BytesIO
|
||||
|
||||
from ADC_function import *
|
||||
|
||||
# =========website========
|
||||
@@ -536,11 +538,11 @@ def add_mark_thread(pic_path, cn_sub, leak, uncensored, conf):
|
||||
def add_to_pic(pic_path, img_pic, size, count, mode):
|
||||
mark_pic_path = ''
|
||||
if mode == 1:
|
||||
mark_pic_path = 'Img/SUB.png'
|
||||
mark_pic_path = BytesIO(get_html("https://raw.githubusercontent.com/yoshiko2/AV_Data_Capture/master/Img/SUB.png",return_type="content"))
|
||||
elif mode == 2:
|
||||
mark_pic_path = 'Img/LEAK.png'
|
||||
mark_pic_path = BytesIO(get_html("https://raw.githubusercontent.com/yoshiko2/AV_Data_Capture/master/Img/LEAK.png",return_type="content"))
|
||||
elif mode == 3:
|
||||
mark_pic_path = 'Img/UNCENSORED.png'
|
||||
mark_pic_path = BytesIO(get_html("https://raw.githubusercontent.com/yoshiko2/AV_Data_Capture/master/Img/UNCENSORED.png",return_type="content"))
|
||||
img_subt = Image.open(mark_pic_path)
|
||||
scroll_high = int(img_pic.height / size)
|
||||
scroll_wide = int(scroll_high * img_subt.width / img_subt.height)
|
||||
|
||||
Reference in New Issue
Block a user