SFML community forums
Help => Graphics => Topic started by: Legendier on March 18, 2023, 10:33:28 pm
-
So I have a little program that takes an .png image makes a few modifications and saves it to a file. and it works fine and all but I would like if it could set all the images to a certain size but there doesn't seem to be a function for resizing images. is there an easy way to resize an image, like sf::Sprite::setScale? or do I have to make my own function for it.
-
I figured it out.
I edited an sf::sprite of the image and using sf::RenderTexture got the image from the sprite.
-
I was just going to reply to do the same thing :)
Remember that if you want smooth scaling, you could set the texture to be smooth before drawing it scaled to the render texture.
You can, of course, write scaling functions yourself. Basic ones are quite simple to do ;)