16
Graphics / [SOLVED] Little bit of trouble with loading from memory.
« on: December 09, 2009, 08:34:34 pm »
I've been trying to create resource files for a game I've been working on and I have never worked with them before.
I found a tutorial online with C and SDL and have been trying to modify it to my own needs.
I use http://gpwiki.org/index.php/C:Custom_Resource_Files that tutorial to create the custom resource file.
Then I use http://gpwiki.org/index.php/C:Displaying_a_Bitmap_from_a_Custom_Resource_File_using_SDL_RWops that tutorial, modified to use with SFML, and I've been having some trouble.
I keep getting "Failed to load image from memory. Reason: Unknown image type".
The image is a PNG. The size passed to the function is correct.
I attempted to use a BMP, and it displayed it, but the colors were corrupted.
Am I going about this the wrong way?
I found a tutorial online with C and SDL and have been trying to modify it to my own needs.
I use http://gpwiki.org/index.php/C:Custom_Resource_Files that tutorial to create the custom resource file.
Then I use http://gpwiki.org/index.php/C:Displaying_a_Bitmap_from_a_Custom_Resource_File_using_SDL_RWops that tutorial, modified to use with SFML, and I've been having some trouble.
I keep getting "Failed to load image from memory. Reason: Unknown image type".
The image is a PNG. The size passed to the function is correct.
I attempted to use a BMP, and it displayed it, but the colors were corrupted.
Am I going about this the wrong way?