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

Author Topic: [Not needed] sf::Image Append  (Read 2362 times)

0 Members and 1 Guest are viewing this topic.

Cuban-Pete

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
[Not needed] sf::Image Append
« on: June 28, 2011, 06:32:54 pm »
I would like to see an image operator that appends images together.

I tried myself this and it's pretty difficult. Well, appending vertically (same width images) is not a problem, but horizontal it is.

If it is not on the agenda, I might try to create my own - if you guys want to help that is.  :roll:   :)  Perhaps I will start with a AppendVertical function.  :P

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
[Not needed] sf::Image Append
« Reply #1 on: June 28, 2011, 06:42:39 pm »
I don't think this is SFML's task, but it isn't difficult to achieve on user side. Just create a third image big enough to contain both images, and copy the pixels using sf::Image::Copy().
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Cuban-Pete

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
[Not needed] sf::Image Append
« Reply #2 on: June 28, 2011, 07:00:31 pm »
Awesome! That sf::Image::Copy() works like charm!  Thanks :D

 

anything