fire1 bug
This commit is contained in:
parent
2e2abebd3b
commit
ddce16a893
|
@ -50,7 +50,7 @@ def fire1(ip: str, pic_url: str):
|
|||
img_name = '{}.png'.format(uuid.uuid4())
|
||||
img_path = settings.BASE_DIR + '/temp/' + img_name
|
||||
with open(img_path, "wb") as f:
|
||||
f.write(requests.get(url=pic_url, verify=False).content).read())
|
||||
f.write(requests.get(url=pic_url, verify=False).content)
|
||||
img = cv2.imread(img_path)
|
||||
resized_img = cv2.resize(img, None, fx=0.25, fy=0.25)
|
||||
resized_img = cv2.imencode('.png', resized_img)[1]
|
||||
|
@ -65,10 +65,6 @@ def fire1(ip: str, pic_url: str):
|
|||
return True, response
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
path = 'http://10.99.5.24/evo-apigw/evo-oss/6ad010cf-ce45-11ec-9715-e4246c7d1635/20220826/1/dsf_3de82501-2521-11ed-884a-e4246c7d1635_7236037_7245601.jpg?token=399773e6-71f7-4202-b234-ff5aa8d2492c'
|
||||
base64img = str(base64.b64encode(BytesIO(requests.get(url=path, verify=False).content).read()), 'utf-8')
|
||||
|
|
Loading…
Reference in New Issue