Load from ram ?
BlitzMax Forums/BlitzMax Programming/Load from ram ?
| ||
It is possible to read image file directly from a memory bank ? (please don't talk to me about incbin :) ), because i'm making a packer ;) and actualy if i want to load an image or pixmap from my pak file, i must save it on disk before load ! (like blitz3D) I have look under the doc and i have see some CreateRamSTream ? It is possible to use ram stream for read image ? or is there another way to di it ? |
| ||
Yes, all of the LoadImage / LoadPixmap / LoadFont etc. commands accept streams as the object parameter. Use CreateBankStream to create a stream from the bank which can then be passed to LoadImage. TBankStream objects are 'wrappers' around banks which allow you to use stream commands like ReadByte, WriteByte etc. to read and write data from streams. |
| ||
Many thanks for explain ! |
| ||
. |
| ||
Filax, could u use this loading info to make the imagebutton load from a stream too? |