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

Author Topic: [SOLVED] Load image through another image?  (Read 867 times)

0 Members and 1 Guest are viewing this topic.

Chili

  • Guest
[SOLVED] Load image through another image?
« on: March 01, 2013, 10:29:27 pm »
I saw that version 1.6 had such a feature(http://www.sfml-dev.org/documentation/1.6/classsf_1_1Image.php#a408c40c8675363adfa96a8b9a9576bc2) and wondered how would you got about doing it in 2.0? I need it to update an existing image on the client side with data from the main server.
« Last Edit: March 02, 2013, 12:06:40 am by Chili »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10848
    • View Profile
    • development blog
    • Email
Re: Load image through another image?
« Reply #1 on: March 01, 2013, 11:49:03 pm »
Well the function still exists, but for your problem, you can simply pass the new dimensions and then an array of pixels and then call texture.update().
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Chili

  • Guest
Re: Load image through another image?
« Reply #2 on: March 02, 2013, 12:05:51 am »
Oh, how did I miss that the exact same function still existed...

 I still need to pass it as an image since I'm planing on manipulating the pixels on the image.

 

anything