Skip to content

Commit

Permalink
MPR Update Images folder name to images
Browse files Browse the repository at this point in the history
Update Images folder name to images
  • Loading branch information
pkong-ds authored Aug 15, 2024
2 parents 4bbe2bc + acc9153 commit 8a3633e
Show file tree
Hide file tree
Showing 1,128 changed files with 76 additions and 76 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ Now, in your terminal:

### Add device image

1. Place the portrait and landscape image as `{device_id}-portrait.png` and `{device_id}-landscape.png` in `public/Images/mockup_templates/`
2. Run `make create-mask-image` to create mask image to `public/Images/mockup_mask_templates/`
3. Run `make add-new-device`, and input device info, this script will let user use `{device_id}-portrait.png` in `public/Images/mockup_mask_templates/` to get the frame of the image
1. Place the portrait and landscape image as `{device_id}-portrait.png` and `{device_id}-landscape.png` in `public/images/mockup_templates/`
2. Run `make create-mask-image` to create mask image to `public/images/mockup_mask_templates/`
3. Run `make add-new-device`, and input device info, this script will let user use `{device_id}-portrait.png` in `public/images/mockup_mask_templates/` to get the frame of the image
- The script will ask you to input some info for the device, after input the device info, you should see a window as below:
- <img width="756" alt="Screenshot 2023-09-01 at 2 31 31 PM" src="https://github.com/YayunHuang/mockuphone/assets/48404737/14ede2b1-7fb0-4e02-8405-386ee532539e">
- Resize the window if you can't see 4 trackbar on top
Expand Down
2 changes: 1 addition & 1 deletion add_device_scripts/add_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
device_name = input("Input device_name(ex: Samsung Galaxy S20): ")
device_type = input("Input device_type(Android/iOS/TV/Laptops/Macbook): ")

image_path = f"public/Images/mockup_mask_templates/{device_id}-portrait.png"
image_path = f"public/images/mockup_mask_templates/{device_id}-portrait.png"
img = cv2.imread(image_path)
cv2.namedWindow("image")
cv2.imshow("image", img)
Expand Down
6 changes: 3 additions & 3 deletions add_device_scripts/create_mask_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ def bfs2(image):
positionsList.append((x - 1, y))


path = "public/Images/mockup_templates"
device_path = "public/Images/devices_picture"
outputPath = "public/Images/mockup_mask_templates"
path = "public/images/mockup_templates"
device_path = "public/images/devices_picture"
outputPath = "public/images/mockup_mask_templates"
if len(sys.argv) == 1:
print("use default path ", path)
else:
Expand Down
2 changes: 1 addition & 1 deletion add_device_scripts/get_angled_device_coord.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
x1, y1, x2, y2, x3, y3, x4, y4 = 0, 0, 0, 0, 0, 0, 0, 0

image_path = input(
"Input image path\n(ex: public/Images/devices_picture/"
"Input image path\n(ex: public/images/devices_picture/"
"apple-ipadpro11-spacegrey-right.png)\n"
)
img = cv2.imread(image_path)
Expand Down
4 changes: 2 additions & 2 deletions mockup_package/mockup/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

async def mockup(location, device_id, original_img_path_list, device_info):
device_path_prefix = f"{location.split('/')[0]}//{location.split('/')[2]}"
device_mask_path_prefix = device_path_prefix + "/Images/mockup_mask_templates/"
device_path_prefix += "/Images/mockup_templates/"
device_mask_path_prefix = device_path_prefix + "/images/mockup_mask_templates/"
device_path_prefix += "/images/mockup_templates/"
device_path = "./device.png"
device_mask_path = "./device_mask.png"
output_img_path_list = []
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading

0 comments on commit 8a3633e

Please sign in to comment.