Hi,

I experimented tonight with adding static SVG conversion support to JPluck
using the Batik toolkit from xml.apache.org. It's working really well and I
believe that SVG conversion is a very useful thing to have for Plucker.

First of all, for those unfamiliar with it: SVG is an open, W3C-endorsed
vector graphics format that describes images  using XML syntax. The
advantage of vector graphics is that they describe *how* to draw the image,
rather than encoding the image in a fixed, bitmap form. An application can
therefore draw the same vector image with optimal quality for a variety of
resolutions. So far this should be familiar stuff to most people here.

I've prepared three demonstration galleries. They've been generated by the
command-line Gallery tool. This application scans a directory for
JPEG/PNG/GIF/SVG images and creates a gallery with index and links.
Remember, the images are bitmaps generated by the Batik toolkit on the
client.

http://jpluck.sourceforge.net/svg_gallery_4bpp.pdb
Gallery with 4bpp images and 2bpp large versions. Click on the image to see
the large version.

http://jpluck.sourceforge.net/svg_gallery_8bpp.pdb
8bpp images and 4bpp large versions.

http://jpluck.sourceforge.net/svg_gallery_16bpp.pdb
16bpp images and 8bpp large versions.

The source SVG files used in the galleries are here:
http://jpluck.sourceforge.net/svg.zip
They are from the Batik toolkit. To view them you must have an SVG viewer
such as the Adobe SVG plug-in or Batik (http://xml.apache.org/batik/)

Now the large versions of the images are there to show you that SVG, being a
vector graphics format, can scale well to different resolutions. For Plucker
(and handhelds in general) this is useful if you want to target multiple
resolutions (160x160 or 320x320).

The problem with large images is that the resolution is severely limited for
8bpp and 16bpp images because of the 60K limit. For 8bpp images you can have
an image of max. 244x244 pixels. For 16bpp the size is limited to 173x173.
For hires color devices this is really too small. 4bpp is limited to 346x346
and 2bpp to 489x489, but these bit depths yield poor image quality. (The
sample galleries use the maximum resolution possible for the large
versions.)

What's the use of all this? JPluck already supports XML and XSL
stylesheets(though this is "under the hood", the functionality hasn't yet
surfaced in the GUI). You could write an XSL stylesheet that converts XML
data to an SVG image. One particular fun use of this would be
http://weather.interceptvector.com/ which provides weather reports in raw
XML format. You could describe the weather graphically  with a thermometer
and cloudy/rainy/sunny icons.

That said, there's a lamentable lack of XML feeds on the web, so the
usefulness of having static SVG support is limited for now.

Anyway, I have some really cool ideas for SVG support. The footprint isn't
that large so I think I'll add it to the JPluck core distribution.


Regards
-Laurens
---
http://jpluck.sourceforge.net/
Open-source Plucker document creation toolkit.

_______________________________________________
plucker-list mailing list
[EMAIL PROTECTED]
http://lists.rubberchicken.org/mailman/listinfo/plucker-list

Reply via email to