Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: is it possible to change an image?  (Read 2090 times)

0 Members and 1 Guest are viewing this topic.

Ankou

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
is it possible to change an image?
« 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?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
is it possible to change an image?
« Reply #1 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");
Laurent Gomila - SFML developer