For this, please prepare a suitable image, according to the format mentioned above. First of all, the display method of the foreground image using the color key...
[image storage="bg0" page=fore layer=base]
[wait time=200]
*start|Start
[cm]
[image layer=0 page=fore storage="as" visible=true key=0xff00ff left=340 top=100]
Hello.
The bold part displays the foreground image. The
image tag(explained here:
→ Display background) is used. This is the tag to read images. The foreground layer 0 is specified for the image display.
There is also an attribute named 'key'. The key attribute specifies the transparent color. The transparent color is specified by the hexadecimal format 0xRRGGBB, in which the part painted with RR (red), GG (green) and BB (blue) is made transparent as the transparent color. For instance, the color key of (r,g,b) = (255,0,255) makes the color key=0xff00ff, in which magenta is the transparent color. If you specify key=255, palette index indicated by the 255 will be the color key. For more information, please refer to the
Tags reference.
storage="as" is an instruction(command) that reads the image, named 'as'. It isn't any problem, if you don't specify an extension. In this case, it automatically looks for a readable image-format among files of the name 'as' and reads the file, if it is found.
The foreground layer is not displayed by default in KAG, visible=true specifies to KAG that the layer should be visible.
'left=340 top=100' specifies the left and the top position of the foreground layer. When using the image tag, you can specify the display position for the foreground layer.
Note
The display offset specified in the PNG image is ignored.
Moreover, it becomes the following if the mask image is used:
[image storage="bg0" page=fore layer=base]
[wait time=200]
*start|Start
[cm]
[image layer=0 page=fore storage="asm" visible=true left=340 top=100]
Hello.
Notice that there is no need for key attribute here.
In the case of this example, 'asm_m' will be loaded as the mask image for the main image, named 'asm'.
It will display the same effect, if PNG image with alpha channel information is used alone, without any need for a color key or a mask.

Execution result