PMIW: Poor Man's Imaging Wrapper

[ printable version ]
 

 Rate PMIW
 
Vote for Poor Man's Imaging Wrapper (PMIW) on O'Reilly's OSDir.com
 PayPal link
 
You or your firm/company may make a donation for the software made available here.
Contact me if you have specific requests or need applications built on them.

PMIW: Poor Man's Imaging Wrapper

Latest additions: BestFit option in Resize, AddTransparency, Flip/ Mirror, Convolve (blur, sharpen), Saving as GIF if acme and pja jars are present
License: Apache License ( http://www.apache.org)
Download: Latest Binary and Sources
Technologies: Java2D, ImageIO, Java Advanced Imaging
Documentation: API Docs (might not be updated)

Poor Man's Imaging Wrapper Demo

This library is a wrapper which exposes a set of imaging operations as a set of functions. One of the main design objectives was to keep it as simple as possible and to generate output images as expected by a person without forcing him to know anything about the underlying imaging APIs. I am still working on it but I would like to know your comments and suggestions. It includes the basic Java2D and Java Advanced Imaging based implementations. The Java2D uses ImageIO (as part of Java 1.4 or otherwise) or AWT for loading images. If JAI libraries are available they will be used. You can also explicitly specify the library you want to use.

It enables you to create imaging applications such as product gallery, photo Album, use dynamic images for products ("new", "free", "20% discount", tags overlaid), image viewer, create dynamic internationalized image buttons, etc.
I use it to develop Jakarta Image taglibs and ANT Image tasks

Currently the wrapper exposes a set of simple imaging operations including:-

  • resize -- scale the image by a percentage or to a specified width and height. Thus it supports differential scaling (i.e., scaleX != scaleY). It can resize to "bestfit" within the sepcified rectangle
  • grayscale -- convert a color image to grayscale.
  • rotate -- rotate the image by some degrees and enlarges it to still accommodate the full image.
  • crop -- get a rectangular region specified as a percentage or absolute pixels.
  • border -- add a border to the image in the color specified.
  • overlay -- overlays/ paints a new image on the parent image at a specified point. Transparency effect can be added by specifying a color The pixels with the color will be considered as transparent.
  • transparency -- adds transparency to an image (0 to 255 levels).
  • flip -- flip an image (about the horizontal or vertical axis).
  • convolve -- can be used to do kernel operations (blur, sharpen, etc).
  • text -- writes a text/html on the image in the color and font at a given point.

The next set of features I am planning is as follows: -

  • Loading Scalable Vector Graphics (SVG) files using Batik.
  • Shape overlay and transformation operations such as "Shape Overlay", "Circle", "Rectangle", etc.
  • Operations such as "Brightness", "Contrast", "Threshold", "Posterize", etc.
  • Special operations such as "Tile", "Bevel border", etc.
  • Implementations based on Standard Windowing Toolkit (SWT) or similar library that might not have "headless" issues.
  • Logging support.

Please let me know your feedback.

 
 

 

 


Thank you for visiting. Send me your feedback.