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

Author Topic: Resource Images to SFML.net Images?  (Read 2365 times)

0 Members and 1 Guest are viewing this topic.

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Resource Images to SFML.net Images?
« on: April 02, 2014, 08:33:13 pm »
Hard to tell if there is an easy way to simply use an image stored as a resource as an SFML.net image.


The resources files in visual studio store as drawing.bitmap  but the needed image is SFML Image. >.>
I have many ideas but need the help of others to find way to make use of them.

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Resource Images to SFML.net Images?
« Reply #1 on: April 02, 2014, 08:36:01 pm »
I think it is possible, but it is not easy... You should probably just stick to normal files for now.  ;)
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Re: Resource Images to SFML.net Images?
« Reply #2 on: April 02, 2014, 08:55:33 pm »
>.>  Could swear I saw a way to do it too.   :'(
I have many ideas but need the help of others to find way to make use of them.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Resource Images to SFML.net Images?
« Reply #3 on: April 03, 2014, 08:54:44 am »
I'm sure you can extract the pixel array from a Drawing.Bitmap and put it into a SFML.Graphics.Image. That shouldn't be hard to do (for the second part: look at the SFML.Graphics.Image's constructors).
Laurent Gomila - SFML developer

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Re: Resource Images to SFML.net Images?
« Reply #4 on: April 03, 2014, 09:04:17 pm »
I'm sure you can extract the pixel array from a Drawing.Bitmap and put it into a SFML.Graphics.Image. That shouldn't be hard to do (for the second part: look at the SFML.Graphics.Image's constructors).

Puzzled on the pixel array part but found out changing the image to a byte array works too. :P
I have many ideas but need the help of others to find way to make use of them.

 

anything