Portfolio / J2ME Solutions
PNG images processing framework

Framework was developed to provide easy to use extensible tools to operate with graphics represented as PNG files. There is provided variety of tools to optimize graphical data, which significantly reduce total size of graphical data without quality loss and allows you to put even more graphics into your J2ME applications than was possible before due to the limitations on JAR size. Futhermore framework provides a lot of facilities to operate with PNG data directly, for example: you can easily extract and modify any part of PNG image, you can merge palettes from several PNG images, you can change Hue/Saturation/Brightness of PNG images, etc.

Framework provides definition of custom data format for image data and includes custom image format encoders and decoders, including decoder compatible with J2ME MIDP 1.0. Using of custom image data format allows melting of several similar (by palette) images into one file, where palette and actual PNG image data separated. That allows you to put several animation frames into one file and than acquire that frames as array of images, which eliminates need to use clips in you drawing process (this will speed up performance of your J2ME applications). Moreover, because all images use one single palette this will lead to significant reduce of total size of graphical data and allows you to change images palette during runtime while images decoding stage occurs. Thus you will be able to acquire sprites with different colors without increasing total size of your image data in JAR file - furthermore total size of image data will be less than usually when you simply store animation frames as one image and for different color store different sequences of frames.

Main features:

  • Custom image data format, which lead to decreasing of total size of image data and allows to change images palette during runtime while images decoding stage occurs. Thus you will be able to acquire sprites with different colors without increasing total size of your gfx data in JAR file.
  • MIDP 1.0 compatible decoder for custom image format, which decodes image data and returns array of images. This allows to draw images directly without clip operation (this will speed up performance of your J2ME applications) and in the same time total size of gfx data in JAR file will be the same or even less than if it will be represented as one image with several sequences of frames.
  • Melting tool to melt several PNG files and store it as one file using custom data format (see above).
  • Merging tool which allows you to merge palettes of several PNG images and modify palette info in each PNG file processed.
  • Cleaning tool to remove all ancillary information from PNG files. This will lead to up to two times size reduction, especially when processed small images.
  • Tool to operate with image color in HSB (Hue, Saturation and Brightness) color space, which can be used to acquire sprites with different colors, but with the same palette data, which allows runtime color manipulations directly from MIDLets.
  • Fully integrated with Ant build tool's environment allowing you to fully automate building process.
  • Provides very flexible and extensible API that allows you to easy customize framework for particular needs.

The full fledged framework, which provides easy way to develop J2ME based applications with minimal efforts and in short terms. Framework allows easy developing of sophisticated MIDP 1.0 compatible games and applications with rich UI functionality.

Framework consists of:

  • implementations of various UI elements using vendor specific API from various handsets manufacturers (Nokia, Motorola) to allow full screen displaying, sound, vibration, etc.;
  • utility classes used to perform fixed point calculations;
  • utility classes to perform trigonometric calculations;
  • utility classes, which allows easy storing retrieving information from RMS;
  • component used to display progress of some activity;
  • realization of MVC pattern to develop application UI and control application data flow.