Forced image scaling in LOVE?

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
User avatar
norubal
Party member
Posts: 137
Joined: Tue Jan 15, 2013 5:55 am

Forced image scaling in LOVE?

Post by norubal »

Hello, love users!
I have a simple code to draw jpg image on screen. (Please check love file.)

Code: Select all

function love.load()
	img = love.graphics.newImage("img.jpg")
end

function love.draw()
	love.graphics.draw(img)
end
I have done nothing with scaling. But if I launch it, it displays like this:
(I opened original image with mspaint at left side, and love screen is showing right side.)
problem.png
problem.png (736.71 KiB) Viewed 2834 times
I don't want to scale images like this, at least I want to know why unwanted scaling is happening...
If you have any idea, please share. Any help will be thankful.
Attachments
problem.love
(53.11 KiB) Downloaded 80 times
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Forced image scaling in LOVE?

Post by raidho36 »

I think it's the paint that does the scaling - LOVE displays graphic 1-to-1.

Try checking this with pixel perfect checker pattern.
User avatar
norubal
Party member
Posts: 137
Joined: Tue Jan 15, 2013 5:55 am

Re: Forced image scaling in LOVE?

Post by norubal »

I found out it's related with my display settings.
scaling.png
scaling.png (42.2 KiB) Viewed 2814 times
If I change this value to '100%', love(or mspaint, whatever) won't scale so image will show normal.
But I'm still wondering why this happen, and there are any way to prevent scaling at higher dpi than 100%.
Zireael
Party member
Posts: 139
Joined: Fri Sep 02, 2016 10:52 am

Re: Forced image scaling in LOVE?

Post by Zireael »

Those display settings only affect apps that respect them (mostly MS apps). So your paint scales but love doesn't, I think.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 228 guests