So I want to scale an image, but the problem is that only sprites have a function for that.
I need to use the function getPixel from the resulting image, but I don't know how to convert the scaled sprite to an image.
I'd try something like this:
sf::Texture texture;
texture.loadFromImage(image);
sf::Sprite sprite;
sprite.setTexture(texture, true);
sprite.scale(0.5,0.5);
//backward
texture=sprite.getTexture(); //this isn't accepted by the compiler
image=texture.copyToImage();