JavaZOOM Web Site
Applets !
Open projects
Services
Links
About JavaZOOM

Our JSP chat solution

Any Question ?
Try our Forums !

 

[Features] [Installation] [Parameters] [FAQ] [download and purchase]

Features :
Scaling filter add-on allows to use the power of jClientUpload with an image scaler to generate thumbnails on-the-fly before upload. It saves bandwidth and increases upload performances. It supports multiple image formats such as JPEG, PNG, GIF, BMP, ... (see matrix below).

Supported input (from) and output (to) image formats matrix :
Supported image formats matrix
 JRE 1.4 required.     JRE 1.5 or IO Tools required.
 IO Tools (1MB add-on) required.     External encoder required.

Installation :
Scaling Filter is a jClientUpload add-on so you do need jClientUpload installed before installing it. Here are instructions :
1 - Copy dist/lib/jai_imageio.jar and sfilter.jar under lib/ folder (where others jClientUpload
     JAR files are stored).
2 -
Copy i18n.properties, scalingfilter.properties and all .html + .js files under
     the same folder as jClientUpload HTML/JavaScript files.
3 - Modify dist/applet_http_scaling.js or dist/applet_ftp_scaling_iotools.js
     to setup basic parameters and open the HTML file in your browser to try it.
4 - Optional : Modify scaling.properties to setup scaling filter parameters.

Parameters :
All parameters are available in scaling.properties file.You could select maxwidth and maxheight to generate thumbnails or select scale to magnify images. You could also select both input and output format, compress quality, temporary folder and renaming policy for scaled images :

Parameters Description and sample
maxwidth
maxheight
It allows to select maximum width and height of the generated thumbnail.
For instance, maxwidth=640 maxheight=480
landscape.maxwidth
landscape.maxheight
Same as maxwidth and maxheight but for landscape images only.
portrait.maxwidth
portrait.maxheight
Same as maxwidth and maxheight but for portrait images only.
scaleoption If scaleoption=allowmagnify and image dimensions < maxwidth, maxheight then image will be magnified.
scalefactor It allows to reduce or magnify image regardless to maxwidth and maxheight.
quality This parameter allows to select compression quality from 0.0 to 1.0.
(0 = poor, 1.0 = best).
metadata This parameter allows to forward metadata (exif, ...) from original image to the scaled image.
metadata.error This parameter allows to either abort or ignore metadata error while uploading.
tmpfolder This parameter allows to select local folder where images will be scaled before upload. Default is user's home. "auto" value could be used to select the folder from original image (useful when working with relativefilename parameter).
renamepolicy This parameter defines the filename of the scaled image to upload. For instance, if you upload image1.gif with JPEG output format then :
renamepolicy=rename => uploaded filename = image1.jpg
renamepolicy=append => uploaded filename = image1.gif.jpg
extensions This parameter allows to select allowed image formats for scaling.
For instance : extensions=jpg,jpeg,gif,png,bmp
forcergb This parameter allows to convert image color space to RGB. It could increase scaling performance.
imageloader This parameter allows to select implementation for the image loading. Default is ImageIO API. imageloader= toolkit means that AWT API will be used.
impl This parameter allows to select implementation for image scaling. Value could be :
impl=AWT
impl=ImageIO (Recommended, this is the default one)
impl=ImageIOSubsample (This one is very fast but only allow integer-based scaled size. It doesn't fit to maxwidth and maxheight).
outformat This parameter allows to select the format of the scaled image. For instance : outformat=jpeg
If it is commented then incomming image format is used. Note that GIF is not available as output format.
maxpixels This parameter allows to select limit (in pixels) for images to scale. It allows to avoid OutOfMemory errors for some large images. For instance, if maxpixels=9000000 then image > 3000x3000 will be uploaded without being scaled. If it is commented then there is no limit.

FAQ :
  • What do I need to run Scaling Filter ?
    You need Java (JRE 1.4 or higher) installed on client-side and jClientUpload installed.
  • How to setup Scaling Filter ?
    Scaling Filter package includes two sample files : One for HTTP upload (see applet_http_scaling.html and applet_http_scaling.jsapplet_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. See the matrix at the top 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 can I rename scaled images ?
    Such feature is not available through scaling filter but from jClientUpload. 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:">
  • 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.
  • Is it possible to forward EXIF meta data to scaled image ?
    Yes, enable metadata=all 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 jClientUpload : Uncomment the following keys in your i18n.properties :
         filechooser.preview.image=enabled
         filechooser.preview.image.title=Image preview
         filechooser.preview.image.enabled=Enabled

  • 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.
  • Scaled images have dark, orange or pink tint, what's wrong ?
    Check that forcergb=true parameter is enabled in your scaling.properties.
  • 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 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
         maxheight.

  • Can I use Scaling Filter Pro with jClientUpload Enterprise ?
    No, Scaling Filter Pro works with jClientUpload Pro only. Scaling Filter Enterprise requires jClientUpload Enterprise.

Download :

Download Scaling Filter Pro full package
(Includes samples and binaries - 1 MB)

  English
 V1.6a  [zip]  [tar.gz]
(requires jClientUpload 1.9.3)
 V1.6  [zip]  [tar.gz]
(requires jClientUpload 1.9.2)
 V1.5a  [zip]  [tar.gz]
(requires jClientUpload 1.9.1)

Purchase :

   Scaling Filter Pro   Scaling Filter Enterprise 
Requires :
jClientUpload Pro jClientUpload Enterprise
API : No Yes
Source code : No Yes
Price : $19 per domain $99 - unlimited domains
  Purchase
Purchase Scaling Filter Pro
Purchase
Purchase Scaling Filter Enterprise

<< back to jClientUpload Support

 

 

[News]

[Applets]

[Servlets]

[Services]

[Projects]

[Links]

[About]
 

 

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.