Skip to content

Vips::Image.thumbnail(,width,) constrains to largest dimension and not the width #241

@da2x

Description

@da2x

The second parameter to Image.thumbnail is  documented as a constraint to the width. However, it constrains the largest dimension of the image and not just the width (as the name implies).

Example:

img = Vips::Image.thumbnail("any_800x900_image.png", 600)
img.write_to_file("test.png")

The resulting image is 533x600 px instead of 600x675 px as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions