summaryrefslogtreecommitdiffstats
path: root/g4f/image.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g4f/image.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/g4f/image.py b/g4f/image.py
index 3f26f75f..f0ee0395 100644
--- a/g4f/image.py
+++ b/g4f/image.py
@@ -46,9 +46,8 @@ def to_image(image: ImageType, is_svg: bool = False) -> Image:
return open_image(BytesIO(image))
elif not isinstance(image, Image):
image = open_image(image)
- copy = image.copy()
- copy.format = image.format
- return copy
+ image.load()
+ return image
return image
def is_allowed_extension(filename: str) -> bool: