Here's the function using bg0 to show an image and you can just callasm in a script to the offset+1 of it.
However, in FR bg0 will be cleared before the textbox appears, so it can't be used along with a textbox like "msgbox".
The image should be in 16 colors and in size of 32*xx in NTME. (256*xx)
It uses pal #14(0xE) (zero-indexed) in NTME.
Anyway, here's the function:
/*You should insert your tileset & tilemap & palette by using UNLZ-GBA, which means that they should all be lz77 compressed.
For BPRE only. */
.thumb
push {lr}
ldr r0, pal_addr
ldr r1, =0x20377b8
swi 0x11
ldr r0, pal_addr
ldr r1, =0x2037bb8
swi 0x11
ldr r0, tileset_addr
ldr r1, =0x6008000
swi 0x12
ldr r0, tilemap_addr
ldr r1, =0x600f800
swi 0x12
pop {pc}
.ltorg
.align 2
pal_addr: .word 0x8[offset of your compressed palette]
tileset_addr: .word 0x8[offset of your compressed tileset]
tilemap_addr: .word 0x8[offset of you compressed tilemap]