- FAQ -

Basic setup
  • What do I need to run JImageFilter ?
    You need Java (JRE 1.4 or higher) installed on client-side and JFileUpload installed.
  • How to setup JImageFilter ?
    JImageFilter package includes two sample files One for HTTP upload (see applet_http_scaling.html and applet_http_scaling.js) and one for FTP upload (applet_ftp_scaling_iotools.html and applet_ftp_scaling_iotools.js). Edit and modify parameters in the file matching to your need.
  • What image formats are supported ?
    Basically, JPEG and PNG formats are supported. More formats are available depending on JRE version and IOTools usage. GIF format can only be read not written except if you run a JRE 1.6 (or higher). See the matrix for details.
  • What is IOTools ?
    This is an optional package that adds TIFF, JPEG2000, PNM and RAW image formats support. The matching JAR file is about 1MB. You don't need it if you just need JPEG, GIF and PNG support.
  • How to disable IOTools in the FTP sample you provide ?
    Edit applet_ftp_scaling_iotools.js and remove all occurences of ",lib/jai_imageio.jar".
    You should find 3 occurences in ARCHIVE parameters. Once done you can also delete jai_imageio.jar file from lib/ folder.
  • How to setup my own configuration file instead of scaling.properties ?
    You can setup your own configuration file as following:
    <PARAM NAME="filterproperties" VALUE="myscalingconfig.txt">
Advanced setup
  • Is it possible to forward EXIF meta data to scaled image ?
    Yes, enable metadata=unknownmarker in scaling.properties.
  • Is it possible to modify quality of scaled images ?
    Yes, use jpeg output format and enable quality parameter. Small values (such as 0.2) means poor quality and small file size.
  • How to modify aspect ratio to fit scaled dimension to maxwidth x maxheight ?
    Enable scalingoption=fitaspectratio in scaling.properties.
  • Is it possible to preview images before scaling ?
    Yes, but only if end-user is using the file chooser to select images. Preview is a feature of JFileUpload : Uncomment the following keys in your i18n.properties :
         filechooser.preview.image.title=Image preview
    Another solution is to use JImageUpload add-on.
  • Can I generate and upload two thumbnails ?
    Yes, you can generate and upload one or many thumbnails with different parameters (dimensions, quality ...). You can also upload original image. See the following tutorial.
Scaled image filename
  • How can I rename scaled images ?
    Such feature is not available through scaling filter but from JFileUpload. Use "template" parameter. For instance, to append a "_thumb" in filename :
    <PARAM NAME="template" VALUE=":name:_thumb:extension:">
  • How to upload scaled images with folders and subfolders info ?
    Setup tmpfolder=auto in scaling.properties and the following applet parameters:
    <PARAM NAME="folderdepth" VALUE="-1">
    <PARAM NAME="param6" VALUE="relativefilename">
    <PARAM NAME="value6" VALUE="true">
  • Scaled image is renamed as original.gif.jpeg, how to have original.jpeg ?
    You can use renamepolicy=rename in scaling.properties. However, it is not recommended when tmpfolder=auto because it will overwrite original image. Best solution is to keep renamepolicy=append and use "template" parameter such as:
    <PARAM NAME="template" VALUE=":shortname::extension:">
    Note that you can chain template value with a regular expression. For instance, if you want to allow ASCII filenames only for images uploaded then try: <PARAM NAME="template" VALUE=":shortname::extension:|:regex=[^a-zA-Z0-9_\\-\\.]:">
Scaling issues
  • BMP images are uploaded but not scaled, what did I miss ?
    First, check that .bmp is available in extensions parameters from your scaling.properties. Second, make sure you have a JRE 1.5 (or higher) installed or IOTools package enabled.
  • How to stop upload if an image is corrupted ?
    Images that cannot be loaded or scaled (because of corrupted content or memory issues) are uploaded without any modification. A warning message should be displayed in JFileUpload UI. To abort upload on such images then uncomment
    operation.error=abort in scaling.properties.
  • Scaled images have dark, orange or pink tint, what's wrong ?
    Check that forcergb=true parameter is enabled in your scaling.properties. Also, if you're using metadata forwarding then make sure it is setup to unknownmarker. If your problem still occur then try to upgrade to JRE 1.6 (or higher).
  • Scaled image quality is not as good as when using Photoshop, what can I do ?
    You can enable multi-step property in scaling.properties file:
    It enables multi-step bilinear algorithm for a better scaled image quality with ImageIO implementation. It's a little bit slower than one-step bicubic default algorithm and it takes more memory but result is better.
    You can also enable AWT scaling implementation in scaling.properties:
    This one provides best image quality for large images (especially to avoid Moiré pattern issues) but this one is around twice slower than ImageIO. The following table details pros and cons of scaling algorithms available in JImageFilter. Notice that default one is ImageIO one-step bicubic.
    Scaling algorithm Image quality Scaling speed Memory usage
    ImageIO subsample Low Very fast Very low
    ImageIO on-step bicubic Good Fast Low
    ImageIO multi-step bilinear Better Medium Medium
    AWT Best Slow Low
  • Scaling seems slow, how to increase performance ?
    Usually, scaling takes a few seconds. You can increase performances by:
    1 - Check that forcergb=true parameter is enabled in your scaling.properties.
    2 - Upgrade your JRE version (JRE 1.6 rocks !).
  • I'm getting OutOfMemory (Java Heap) error, what can I do ?
    Such issue might occur when you upload large images with big values for maxwidth and maxheight. There are three solutions :
    1 - Increase heap size for applets in client-side Java control panel. Under windows :
         Start->Control Panel->Java->Java tab->Java plugin runtime->Display and add
         the following in execution parameters : -Xmx128m
    2 - Use smaller values for maxwidth and maxheight (for instance 3000x3000).
    3 - Use impl=ImageIOSubsample to select a subsample scaling algorithm. This one
         allows integer scale factor only so it won't fit exactly to maxwidth and
    4 - Starting on JRE 1.6 Update 10, applets allow to setup heap size as applet simple
         parameter. For instance, to setup scale up to 9000x9000px images you need
         around 384MB heap size. So, add the following parameter:
         <PARAM NAME="java_arguments" VALUE="-Xmx384m">
  • Can I update properties with JavaScript ?
    Yes, all properties can be updated through filterparamX/filtervalueX pairs. As filterparamX and filtervalueX can be setup in JavaScript then you can update properties with JavaScript. For instance, if you want to update maxwidth and maxheight:
    <SCRIPT LANGUAGE="JavaScript"><!--
    function sample()
    There is a ready-to-use sample available in samples/javascript folder.
  • Can I use JImageFilter Pro with JFileUpload Enterprise ?
    No, JImageFilter Pro works with JFileUpload Pro only. JImageFilter Enterprise requires JFileUpload Enterprise or Premium.

Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
All other company and/or product names are the property of their respective owners.