diff --git a/api attempts/fo2ward_image.py b/api attempts/fo2ward_image.py deleted file mode 100644 index 124ef602738dab080ca9c771d6b564062ce2b148..0000000000000000000000000000000000000000 --- a/api attempts/fo2ward_image.py +++ /dev/null @@ -1,20 +0,0 @@ -import requests -from PIL import Image -from io import BytesIO -# Fetch camera image from OctoPrint -def fetch_camera_image(): - url = "http://192.168.0.205/webcam/?action=stream" - response = requests.get(url, timeout=10) - print(f"Response size: {len(response.content)} bytes") # Check the size of the response - return response.content - -def display_image(image_data): - try: - image = Image.open(BytesIO(image_data)) - image.show() - except Exception as e: - print(f"Error displaying image: {e}") # Log any errors - -if __name__ == "__main__": - image_data = fetch_camera_image() - display_image(image_data)