I put the png data in memory like this :
Code: Select all
If OpenFile(0, "test.png") 
    *MemoryID = AllocateMemory(0, Lof() , 0)
    For i=1 To Lof()
        PokeB(*MemoryID, ReadByte()) 
    Next
    CloseFile(0) 
EndIfCode: Select all
If OpenFile(0, "test.png") 
    *MemoryID = AllocateMemory(0, Lof() , 0)
    For i=1 To Lof()
        PokeB(*MemoryID, ReadByte()) 
    Next
    CloseFile(0) 
EndIfShould function. CatchSprite need a only a Adress.coma wrote:Is it possible to put an image in memory using OpenFile and poke, and then to catch it with CatchSprite ?
I put the png data in memory like this :
(that I want to do with this is to to load png from a big data file containing all pictures I need)Code: Select all
If OpenFile(0, "test.png") *MemoryID = AllocateMemory(0, Lof() , 0) For i=1 To Lof() PokeB(*MemoryID, ReadByte()) Next CloseFile(0) EndIf
Code: Select all
If OpenFile(0, "test.png") 
  *MemoryID = AllocateMemory(0, Lof() , 0) 
  For i=1 To Lof() 
    PokeB(*MemoryID+i, ReadByte()) 
  Next 
  CloseFile(0) 
EndIfCode: Select all
If OpenFile(0, "test.png") 
  *MemoryID = AllocateMemory(0, Lof() , 0) 
  *help.byte
  For i=1 To Lof() 
    *help\b=ReadByte()) :*help+1
  Next 
  CloseFile(0) 
EndIf