diff --git a/mockup_package/mockup/image.py b/mockup_package/mockup/image.py index feabda5..20c9135 100755 --- a/mockup_package/mockup/image.py +++ b/mockup_package/mockup/image.py @@ -32,8 +32,10 @@ async def mockup(location, device_id, original_img_path_list, device_info): raise ig.create_fit_coord_image(spec) deviceView = str(spec["image"]).split("-")[-1].split(".")[0] - path = f"{os.path.splitext(os.path.basename(original_img_path))[0]}" - f"-{deviceView}.png" + path = ( + f"{os.path.splitext(os.path.basename(original_img_path))[0]}" + + f"-{deviceView}.png" + ) ig.create_mockup_image(device_path, device_mask_path, path) output_img_path_list.append([path, original_img_path, deviceView]) diff --git a/public/image_process.py b/public/image_process.py index 0cf2655..20751d3 100644 --- a/public/image_process.py +++ b/public/image_process.py @@ -30,7 +30,6 @@ def save_image(imageList): returnList = [] for image in imageList: path = image[0] - deviceView = image[2] my_image = Image.open(path) my_stream = io.BytesIO() my_image.save(my_stream, format="PNG") @@ -38,5 +37,6 @@ def save_image(imageList): base64_utf8_str = base64.b64encode(binary_fc).decode("utf-8") basename, ext = os.path.splitext(path) dataurl = f"data:image/{ext};base64,{base64_utf8_str}" - returnList.append([f"img{basename}-{deviceView}", dataurl]) + print(basename) + returnList.append([f"img{basename}", dataurl]) return returnList diff --git a/public/mockup.zip b/public/mockup.zip index cb39c96..37f99aa 100644 Binary files a/public/mockup.zip and b/public/mockup.zip differ