J-Painter - a drawing applet.
 
Frequently Asked Questions and Answers

 
General questions
QIs there a limitation on the processed image size?
AThe editor hasn't any particular limitation on image size, but it can run across the memory problem (which is usually limited for applets). A reasonable practical limit is about 1 Mega pixels.
 
QWhat image formats the editor supports ?
AThe editor can load PNG, JPEG, GIF, and BMP image files. While saving it can produce PNG (24 bit true color), JPEG (24 bit color), and GIF (256 color indexes with RLE compression)
 
QIs it possible to load images from the user's local drive for editing?
ABecause of security reasons applets are disallowed to comminicate with the client's local drives so the editor can load and save images from/to the server only. However you can accept the user's image via an upload form and then display the uploaded file within the editor.
 
QCan I keep the images in my server-side SQL database?
AYes of course. The editor downloads images from the server by it's link and uploads them by requesting a server-side script, so a particular image location at your server depends on your scripts only. The script are free to keep images anywhere, for example as files, as database records, or send them via email.
 
Q What fonts can I use for the text tool? Can I define my own font?
A You can specify any font names, but you should keep in mind that actually available font set depends on the user's platform. Only the following logical font names are supported surely: Serif, SansSerif, Monospaced, Dialog. If you don't specify the parameter "font_faces" the Font Panel tries to detect the available fonts. If you specify a font that doesn't exists on the target platform the default font is used instead (usually it's "Dialog").
 
QDoes the editor support image transaparency?
AThe editor doesn't support transparency for the main image but allows apply clip arts with transparent areas to it.
 
 
Placing the editor on a web page
QI needn't some of the drawing tools for my task. Can I remove them?
AYes, you can. While placing the tool panel at your web page you can define what tools should be displayed and how they are arranged. This also concerns the other panels: Color chooser, Clip art panel, etc.. Moreover you can remove some of the panels at all.
 
QCan I scroll large images within the DrawCanvas?
AThe editor hasn't built-in scroll capabilities, but you can easy implement it using a special HTML style. See the documentation section "Scrolling the canvas".
 
 
Load image questions
QThe editor doesn't load my image from the server. Why?
APlease examine the following reasons:
  1. The image doesn't exist at the specified URL at the server or is not accessible for some reason, for example because it's directory has a restricted access. To check these reasons try to load the image in your rowsers typing it's URL in the browser's address line.
  2. Unknown image format: The editor can load only GIF, JPEG, PNG, and BMP images.
  3. The image is located at a host different then the applet is. Applets are disallowed to communicate with servers (hosts) other then they were loaded from.
 
QHow can I erase the original user's file uploaded for editing after loading it to the editor?
ATo erase the user's file immediately after downloading:
  1. Create a server side script which reads the user's file, returns it as a response, and erases the image file.
  2. Point this script in the applet's parameter "load" instead of pointing the image's URL directly.
 
 
Save image questions
QI have obtained a license code but the applet reports that it's an unlicensed copy?
APlease examine the following reasons:
  • You haven't inserted the license code to the file 'license.txt'.
  • The license code doesn't correspond the domain name you're trying the editor on.
  • The file 'license.txt' is not accessible to the applet, for some reason. To check this try to open it in your browser.
 
QThe applet doesn't create the resulting image at the server.
APossible reasons:
  • URL of the saving script is invalid
  • The saving script fails because of some error in it, for example because it has not enough permissions to create files at the server (directory).
 
QThe save script creates image files at the server but nothing more happens after the saving action.
ATo obtain a desirable reaction your saving script must output special commands to the applet. See the documentation section "Saving images to your server" for more details. Another possible reason - the script has some errors.
 
QI would like to produce unique file names for each saved image. How can I do it ?
AThere are a lot of methods to generate uniques filenames. For example, you can use the current date & time, user's IP, and their combination to produce unique filenames.
 
QHow can I control the output image format ?
AThe editor saves images (by default) in format they were loaded in. To specify another image format use the DrawCanvas applet parameter "save_format". It can accept one of the following values "PNG", "JPEG", "GIF".
 
QWhy JPEG files created by the editor are too large ?
AThe JPEG file size depends on the quality parameter which can vary from 1 to 100. The value 100 gives the best quality (the same as the original image had) but the biggest file size and conversely for 1. The default value used by the editor is 75, but you may control this value. The DrawCanvas applet supports the parameter jpeg_quality. Example:
<param name="jpeg_quality" value="50">
 
QCan I pass additional parameters to my save script?
AYes. You can specify your parameters in the script's URL, for example:
  <param name="save" value="save.asp?param1=val1&param2=val2">
 
QCan I output the response page (after saving) to another frame or a new browser's window?
ATo display the saving response within a specific frame use the response command
#SETDOCTAG=_name_of_the_frame
To display the saving response a new browser's window use the response command
#SETDOCTAG=_blank
NOTE! To have an effect the command #SETDOCTAG must be sent to the applet before the command #SHOWDOCUMENT.
 
 
Debug questions
QCan I get any kind of error output from the applet?
ATo get more information about the applet errors open the browser's Java Console. A particalar way to access the Java console depends on the browser. Here are the directions for the most popular browsers:
  • In Internet Explorer, Firefox, Mozilla, and Netscape Navigator with Sun's Java plug-in
    1. Click the Java plug-in icon on the system tray.
    2. Choose "Open Console".

  • In Internet Explorer (with native MS Java engine):
    1. Open the the main menu item "Tools|Options".
    2. Choose the Tab "Advanced".
    3. Find the item "Java Console enabled" and set the check mark near it.
    4. Reload the browser so this option take the effect.
    5. Select the main menu item "View|Java Console".

 
QI don't see my saving script output. How can I debug it?
AIf you're using the upload saving method debug your script separately using the following simple upload from:
  
     <form method="post" action="...MYSCRIPT..." enctype="multipart/form-data" >
     	<input type="file" name="image">
     	<input type="submit">
     </form>
   
If you're using the base64 saving method (not JavaScript saving) debug your script separately using the following from:
     <form method="post" action="...MYSCRIPT..." >
     	<textarea name="image"></textarea>
     	<input type="submit">
     </form>
   
Before submitting this form paste a base64 encoded image file to the form's text area.