Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by mostlygeek

Hi,

on image.js, lines 126/127:

width  = Math.round((width ? width : this.width) * scale);
height = Math.round((height ? height : this.height) * scale);

Added Math.round() which gets rid of errors in webkit browser when the canvas is scaled.

1 decade ago by mostlygeek

hm... never mind, the above isn't all that stable.
Though still in search of a method for scaling ig.Image with float values.

1 decade ago by Arantor

Given that the scaling of images is performed manually (i.e. there is specific code to actually handle the scaling, and it's done with nearest-neighbour scaling), float values aren't going to work too well.

You're going to end up rewriting the resize() routine to achieve that.
Page 1 of 1
« first « previous next › last »