The editor can open PNG, GIF, JPEG, or BMP images. To load an image specify its URL with the applet parameter "load", for example:
<applet code="Painter.class" archive="painter.jar,res.zip" width="800" height="600">
<param name="load" value="myimage.jpg">
<param name="jnlp_href" value="plugin2.jnlp">
<param name="codebase_lookup" value="false">
</applet>
The URL can be either absolute or relative to the current web page.
You can load an image which is displayed in the background of the main image, for example:
<applet code="Painter.class" archive="painter.jar,res.zip" width="800" height="600">
<param name="bgimage" value="mybgimage.jpg">
<param name="image_bgcolor" value="transparent">
<param name="jnlp_href" value="plugin2.jnlp">
<param name="codebase_lookup" value="false">
</applet>
The background color of the main image should be set to transparent,
otherwise you'll not be able to see the background image.
If you like to save the drawing and the background image as a single file use the parameter "inseparable_bgimage", for example:
<applet code="Painter.class" archive="painter.jar,res.zip" width="800" height="600">
<param name="inseparable_bgimage" value="mybgimage.jpg">
<param name="jnlp_href" value="plugin2.jnlp">
<param name="codebase_lookup" value="false">
</applet>
To edit an existing drawing made with the inseparable background earlier use the original background image again as "inseparable_bgimage".
Note: when you're using inseparable background the main image need not to be transparent.
The mask image is displayed on the top of the main image and allows you to obscure some parts of the drawing and make them unavailable for drawing. To use the mask create a GIF or PNG image which is transparent in the areas available for drawing and specify it with the parameter "mask", for example:
<applet code="Painter.class" archive="painter.jar,res.zip" width="800" height="600">
<param name="mask" value="mymask.gif">
<param name="jnlp_href" value="plugin2.jnlp">
<param name="codebase_lookup" value="false">
</applet>
By default, the mask is not superimposed on the main image while saving. If you like your mask to be merged with the main image use the save option "superimpose".
Example:
<applet code="Painter.class" archive="painter.jar,res.zip" width="800" height="600">
<param name="mask" value="mymask.gif">
<param name="save_options" value="superimpose:image+mask">
<param name="save" value="save.php">
<param name="jnlp_href" value="plugin2.jnlp">
<param name="codebase_lookup" value="false">
</applet>
Since the memory provided to applets is limited J-Painter can't process images of any dimension (typical restriction is about 4 Mpixels). However, J-Painter can open large images scaling them down at load time. To scale-down the images use the parameter load_prescaling.