picture from stream

BlitzMax Forums/BlitzMax Programming/picture from stream

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

The question has probably already been asked a couple of times but i couldn't find anything with the "search" method... is it possible to read some binary data from a file and, knowing that this data is in fact a png for example, to convert it in a TImage thing? One "ugly" way to do so would be reading the wanted part as a binary stream, then save it as a temp file wich then would be loaded with the LoadPNG function... this is "ugly" and probably slow since it requires 2 hard drive access which could be time consuming if the pictures I want to load are big or numerous or both.
So i m looking for a cleanert way, the objective being to encapsulate my game data in a single binary file

Thanks in advance :)