SFML community forums

Help => Graphics => Topic started by: Ankou on September 07, 2008, 06:25:14 pm

Title: is it possible to change an image?
Post by: Ankou on September 07, 2008, 06:25:14 pm
Hi,
Is it possible to draw on an image and if not, why does Image has a save function?
Title: is it possible to change an image?
Post by: Laurent on September 07, 2008, 06:27:53 pm
Quote
Is it possible to draw on an image

Not yet, but it'll be implemented soon (see "render to image" feature).

Quote
why does Image has a save function?

For that :
Code: [Select]
window.Capture().SaveToFile("screenshot.jpg");
That (next version) :
Code: [Select]
image.Copy(source, x, y);
...
image.SaveToFile("tileset.png");

Or that :
Code: [Select]
image.SetPixel(x, y, color);
...
image.SaveToFile("my_drawing.png");