Skip to content

How are maxWidth and maxHeight supposed to work? #150

Open
@derwaldgeist

Description

@derwaldgeist

If I am calling loadImage with maxWidth = 1024, maxHeigth = 1024, I would expect that the neither the width nor the height exceed 1024. Instead, the library seems to set the shorter length to 1024, so the other can exceed its max value. Also, the library stretches the image even if it is smaller.

As an example, I have an input image that is 3560x942. The resulting image is 3869x1024, which is even bigger than the original, and the width is over 3x larger than the maxWidth.

This also happens if I set the maxHeight to 1024 only, i.e. without a maxWidth.

I would expect that maxWidth and maxHeight are maximum values, not minimum values?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions