Code:
DEFINT A-Z
'$DYNAMIC
DECLARE SUB neoImageLoadArrayBMP (Filename AS STRING, Array() AS INTEGER, Pal AS STRING)
SUB neoImageLoadArrayBMP (Filename AS STRING, Array() AS INTEGER, Pal AS STRING)
'loads a BMP file into an array (PUT-compatible)
'- Filename: BMP file to load
'- Array(): array to put it in
'- Pal: the BMP's palette will be stored in here
FF = FREEFILE
OPEN Filename FOR BINARY AS #FF
'stuff
p$ = SPACE$(18)
GET #FF, , p$
'now width and height
Wid& = 0
Hei& = 0
GET #FF, , Wid&
GET #FF, , Hei&
REDIM Array((Wid& * Hei& + 4) \ 2) AS INTEGER
segm% = VARSEG(Array(0))
offs% = VARPTR(Array(0))
DEF SEG = segm%
POKE offs%, (Wid& MOD 32) * 8
POKE offs% + 1, Wid& \ 32
POKE offs% + 2, Hei&
POKE offs% + 3, 0
offs% = offs% + 4
'crap
p$ = SPACE$(28)
GET #FF, , p$
'now the palette
p$ = SPACE$(1024)
GET #FF, , p$
Pal = ""
FOR I = 1 TO 1024 STEP 4
B% = ASC(MID$(p$, I, 1)) \ 4
G% = ASC(MID$(p$, I + 1, 1)) \ 4
R% = ASC(MID$(p$, I + 2, 1)) \ 4
Pal = Pal + CHR$(R%) + CHR$(G%) + CHR$(B%)
NEXT I
'now image data
DEF SEG = segm%
FOR zy = Hei& - 1 TO 0 STEP -1
dat$ = SPACE$(Wid&)
GET #FF, , dat$
FOR zx = 0 TO Wid& - 1
POKE offs% + Wid& * zy + zx, ASC(MID$(dat$, zx + 1, 1))
NEXT zx
NEXT zy
CLOSE #FF
END SUB
This is a BMP loading routine, directly copied from NeoLib v1.6. I tested it on your image and it seemed to work fine.
I cant give any guarantees though.
The BMP will be stored in Array() in PUT format, so you can just use PUT to put it anywhere on screen.
Also you need to set the palette after you loaded the bmp.