8000 Images are resized to integers not floats · Issue #75 · gavinbunney/Toucan · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Images are resized to integers not floats #75
Open
@anonrig

Description

@anonrig

The following code takes the upper bound of 170.6666 (which is 171) when UIScreen.main.scale is 3.0

let size = 512 / UIScreen.main.scale
let image = Toucan(image: item.image!).resize(CGSize(width: size, height: size), fitMode: Toucan.Resize.FitMode.clip).image!

It should have been resized the image according to the float in size. Not the upper bound of it.

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

      0