Page 1 of 1

how to scale a Image without lose the Resolution? [SOLVED]

Posted: Mon Jan 02, 2017 8:21 pm
by kinanprincipe
Hello everyone!,
i'm staring to code with Love2D and i have a question,
How can make a image bigger without lose the resolution?
i tried with

Code: Select all

love.graphics.scale()
and

Code: Select all

love.graphics.draw(x, y, s, Sx, SY)
, but don't work.

Thanks.

Re: how to scale a Image without lose the Resolution?

Posted: Mon Jan 02, 2017 8:26 pm
by veethree
Perhaps what you're looking for is (image):setFilter()

Re: how to scale a Image without lose the Resolution?

Posted: Mon Jan 02, 2017 8:47 pm
by kinanprincipe
Thank you! this was very useful.

Re: how to scale a Image without lose the Resolution? [SOLVED]

Posted: Tue Jan 03, 2017 4:06 am
by zorg
Technically you don't lose resolution when upscaling, only when downscaling; the issue is that upscaled things are either blurred so as to not look jagged, or they aren't, which, with specific styles, like pixelart, may actually look cleaner. And those things depend on the filter mode being bilinear or nearest neighbour. (there are also other types, but löve doesn't really support them, like lanczos filtering for example)