07-15-2023, 06:07 PM
Thanks, GareBare!
I have edited all my programs found here on the forum to fix the _INFLATE error in the BASIMAGE created Subs.
Also -- I've been trying to narrow down in my code exactly what is causes the _INFLATE error. _INFLATE works on most of my programs without needing the 2nd parameter given. It seems _INFLATE only needs it (m.SIZE) only in my BASIMAGE SUBs. Other routines I use _INFLATE don't given the error (like SUBS made with the BASFILE creator). I thought perhaps the error may happen only when using _MEM stuff (like BASIMAGE uses), but that doesn't look like it - - the example below does what a BASIMAGE SUB does, but m.SIZE is not required for _INFLATE to work here. Wonder why _INFLATE fails in in the BASIMAGE created Subs?
_INFLATE works correct here. m.SIZE not needed.
- Dav
I have edited all my programs found here on the forum to fix the _INFLATE error in the BASIMAGE created Subs.
Also -- I've been trying to narrow down in my code exactly what is causes the _INFLATE error. _INFLATE works on most of my programs without needing the 2nd parameter given. It seems _INFLATE only needs it (m.SIZE) only in my BASIMAGE SUBs. Other routines I use _INFLATE don't given the error (like SUBS made with the BASFILE creator). I thought perhaps the error may happen only when using _MEM stuff (like BASIMAGE uses), but that doesn't look like it - - the example below does what a BASIMAGE SUB does, but m.SIZE is not required for _INFLATE to work here. Wonder why _INFLATE fails in in the BASIMAGE created Subs?
_INFLATE works correct here. m.SIZE not needed.
Code: (Select All)
Screen _NewImage(800, 600, 32)
Dim m As _MEM: m = _MemImage(0)
'make empty space for screen data
test$ = Space$(m.SIZE): Print Len(test$)
'move screen memory into string data
_MemGet m, m.OFFSET, test$
'Compress that string data
test$ = _Deflate$(test$): Print Len(test$)
'decompress it as it was
test$ = _Inflate$(test$): Print Len(test$)
_MemFree m
- Dav