Toucan icon indicating copy to clipboard operation
Toucan copied to clipboard

Images are resized to integers not floats

Open anonrig opened this issue 6 years ago • 0 comments

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.

anonrig avatar Mar 17 '19 13:03 anonrig