Hello!
I was created image by love.graphics.newImage. Can I resize it?
Resize image
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Resize image
The image itself does not contain size, position, shearing and such.
You provide this information when drawing with love.graphics.draw.
Take a look at that documentation page and reply if there's still a question
You provide this information when drawing with love.graphics.draw.
Take a look at that documentation page and reply if there's still a question
Re: Resize image
No you can't resize image. You can scale the image during drawing as mentioned above, but the size of the image itself can not be changed.
- Sir_Silver
- Party member
- Posts: 286
- Joined: Mon Aug 22, 2016 2:25 pm
- Contact:
Re: Resize image
@erasio, the image returned from love.graphics.newImage actually does contain, at least, the size (dimensions) of the image.
https://love2d.org/wiki/Image
https://love2d.org/wiki/Image
Re: Resize image
Ah, but what if you display a scaled image and dump the result to a file, then reload it?
Then scale it back up to the original resolution for the pixelly goodness (or badness if you use filtering).
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
Re: Resize image
That is not resizing in image. That is creating new Image.
Btw. Python PIL is cheating also it does:
Code: Select all
img = img.resize((new_width, new_height), Image.ANTIALIAS)
All they do is creating new image and than transfering old data.
Who is online
Users browsing this forum: Bing [Bot] and 7 guests