Ok, I got a workaround that works for my custom code:
my frame-handles (images) for the animTexture are stored in the array "strip(n)", so I only need to readpixel them to store the big picture/animstrip. It was a bit confusing to read from the right frame while writing the big picture. It is no longer a generic BMP Saver now, but works for me.
Surprisingly the Animstrip loads correctly when loaded with the LoadAnimTexture command.
For your Problem with the Loading Garbage artifacts, you could write a custom Loader, something like this (I assume it's a 24bit BMP):
n$="bipicture.bmp"
fs=filesize(n$)
img=loadimage(n$)
w=imagewidth()
h=imageheight()
; (alternatively you could also read w and h from the bmp header: at offset 18 and offset 22 are width and height in 32 Bit values (low bytes first))
freeimage img
img=createimage(w,h)
bank=createbank(fs-54)
re=readfile(n$)
readbytes bank,re,54,fs-54
closefile re
setbuffer imagebuffer(img)
lockbuffer
for y=0 to h-1
for x=0 to w-1
adr=(x*3)+(y*w*3)
r=peekbyte(bank,adr+2)
g=peekbyte(bank,adr+1)
b=peekbyte(bank,adr+0)
rgb=(r shl 16)or(g shl 8)or b
writepixelfast x,y,rgb
next
next
unlockbuffer
setbuffer backbuffer()
Freebank bank
something like that (not tested). If you want to use other Image Formats, it may be harder.
my frame-handles (images) for the animTexture are stored in the array "strip(n)", so I only need to readpixel them to store the big picture/animstrip. It was a bit confusing to read from the right frame while writing the big picture. It is no longer a generic BMP Saver now, but works for me.
Surprisingly the Animstrip loads correctly when loaded with the LoadAnimTexture command.
For your Problem with the Loading Garbage artifacts, you could write a custom Loader, something like this (I assume it's a 24bit BMP):
n$="bipicture.bmp"
fs=filesize(n$)
img=loadimage(n$)
w=imagewidth()
h=imageheight()
; (alternatively you could also read w and h from the bmp header: at offset 18 and offset 22 are width and height in 32 Bit values (low bytes first))
freeimage img
img=createimage(w,h)
bank=createbank(fs-54)
re=readfile(n$)
readbytes bank,re,54,fs-54
closefile re
setbuffer imagebuffer(img)
lockbuffer
for y=0 to h-1
for x=0 to w-1
adr=(x*3)+(y*w*3)
r=peekbyte(bank,adr+2)
g=peekbyte(bank,adr+1)
b=peekbyte(bank,adr+0)
rgb=(r shl 16)or(g shl 8)or b
writepixelfast x,y,rgb
next
next
unlockbuffer
setbuffer backbuffer()
Freebank bank
something like that (not tested). If you want to use other Image Formats, it may be harder.