What happened?
The Resize transform passes FastEmbed's internal image size representation
directly to PIL.Image.resize().
FastEmbed stores image sizes as (height, width), while Pillow expects
(width, height).
This is not observable for square image sizes, but for non-square image
processor configurations the output dimensions are swapped.
What is the expected behaviour?
The Resize transform should convert the internal (height, width) format
to Pillow's expected (width, height) format before calling
PIL.Image.resize().
A minimal reproducible example
img = Image.new("RGB", (300, 300))
resize = Resize(size=(100, 200))
out = resize(img)
print(out.size)
What Python version are you on? e.g. python --version
python 3.13.3
FastEmbed version
0.7.4
What os are you seeing the problem on?
Windows
Relevant stack traces and/or logs
None.
The issue does not raise an exception.
It produces incorrect output dimensions for non-square resize configurations.
What happened?
The Resize transform passes FastEmbed's internal image size representation
directly to
PIL.Image.resize().FastEmbed stores image sizes as
(height, width), while Pillow expects(width, height).This is not observable for square image sizes, but for non-square image
processor configurations the output dimensions are swapped.
What is the expected behaviour?
The Resize transform should convert the internal
(height, width)formatto Pillow's expected
(width, height)format before callingPIL.Image.resize().A minimal reproducible example
img = Image.new("RGB", (300, 300))
resize = Resize(size=(100, 200))
out = resize(img)
print(out.size)
What Python version are you on? e.g. python --version
python 3.13.3
FastEmbed version
0.7.4
What os are you seeing the problem on?
Windows
Relevant stack traces and/or logs
None. The issue does not raise an exception. It produces incorrect output dimensions for non-square resize configurations.