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

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
kinanprincipe
Prole
Posts: 4
Joined: Mon Jan 02, 2017 8:18 pm

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

Post 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.
Last edited by kinanprincipe on Mon Jan 02, 2017 10:09 pm, edited 2 times in total.
User avatar
veethree
Inner party member
Posts: 877
Joined: Sat Dec 10, 2011 7:18 pm

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

Post by veethree »

Perhaps what you're looking for is (image):setFilter()
kinanprincipe
Prole
Posts: 4
Joined: Mon Jan 02, 2017 8:18 pm

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

Post by kinanprincipe »

Thank you! this was very useful.
User avatar
zorg
Party member
Posts: 3465
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

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

Post 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)
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 8 guests