Skip to content

Commit

Permalink
[Fix] Fix confusing image width&height (open-compass#704)
Browse files Browse the repository at this point in the history
Co-authored-by: Yuan Ye <[email protected]>
  • Loading branch information
2 people authored and kennymckormick committed Jan 1, 2025
1 parent b66d47f commit e540952
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vlmeval/api/siliconflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def resize_image(image: Image.Image, max_height: int, max_width: int) -> Image.I
def encode_image(path: str, max_height: int = 1024, max_width: int = 1024) -> str:
image = Image.open(path).convert("RGB")
image = resize_image(image, max_height, max_width)
height, width = image.size
width, height = image.size
if min(height, width) < 50:
scale = 50 / min(width, height)
image = image.resize((int(width * scale), int(height * scale)))
Expand Down

0 comments on commit e540952

Please sign in to comment.