• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GML Loading images as data and creating sprite from said data?

B

Big_Macca_101

Guest
Hi guys, currently reworking my old modding system and was curious whether it was possible to load an image externally and store it as raw data rather than creating a sprite but then being able to take that data and recreate the image as a sprite through code?

Gone through the manual and didn't find anything useful.

I know it's an odd question and my explanation may not have been the best...
 

Simon Gust

Member
You can load an image as a buffer and have the buffer filled with color data. The problem is just the compression the image files have. Your buffer will not fill up correctly and you are unable to use buffer_set_surface(), unless you know how to decompress the image file you're using.
 
Top