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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - renner96

Pages: [1]
1
DotNet / [UPDATED] convert graphics.image to sfml.graphics.image
« on: July 31, 2009, 09:05:14 pm »
Hi,
i want to convert a graphics.image, wich I converted with the following code to a byte array , into a SFML.Graphics.Image.
Code: [Select]

Public Function imageToByteArray(ByVal imageIn As System.Drawing.Image) As Byte()
    Dim ms As MemoryStream = New MemoryStream()
    imageIn.Save(ms, System.Drawing.Imaging.ImageFormat.Gif)
    Return ms.ToArray()
End Function

I hope you can help me. Can i do it without the array?
Thank You
renner96

PS: My English isnĀ“t very good. I`m only on the 7th grade on a German grammar school.


//edit: i tried it with a memorystream, too, but i got an exeption: Failed to load image from memory

//edit2: is there a function to make the image of an graphics.bitmap???

Pages: [1]
anything