diff --git a/examples/webcam/.gitignore b/examples/webcam/.gitignore index aab52d9..225c381 100644 --- a/examples/webcam/.gitignore +++ b/examples/webcam/.gitignore @@ -1 +1,2 @@ -*.png \ No newline at end of file +*.png +*.jpg diff --git a/examples/webcam/dialog.py b/examples/webcam/dialog.py index 88ff3d4..5e46d72 100755 --- a/examples/webcam/dialog.py +++ b/examples/webcam/dialog.py @@ -10,7 +10,7 @@ # read the current webcam image from disk script_path = os.path.abspath(__file__) script_dir = os.path.dirname(script_path) -screenshot_path = os.path.join(script_dir, "webcam.png") +screenshot_path = os.path.join(script_dir, "webcam.jpg") image = cv2.imread(screenshot_path) # add text with wrapping @@ -40,7 +40,7 @@ ) # save the image to another file to preserve it -output_path = os.path.join(script_dir, f"{time.time()}.png") +output_path = os.path.join(script_dir, f"{time.time()}.jpg") cv2.imwrite(output_path, image) # show the image on a UI diff --git a/examples/webcam/webcam.py b/examples/webcam/webcam.py index 7953462..8e6ced5 100755 --- a/examples/webcam/webcam.py +++ b/examples/webcam/webcam.py @@ -28,7 +28,7 @@ def fetch_webcam_image(webcam_url): # save the image to a file in the same directory as the script script_path = os.path.abspath(__file__) script_dir = os.path.dirname(script_path) -screenshot_path = os.path.join(script_dir, "webcam.png") +screenshot_path = os.path.join(script_dir, "webcam.jpg") cv2.imwrite(screenshot_path, image)