Slideshare.net (beta)

 
Post: 
Myspace Hi5 Friendster Xanga LiveJournal Facebook Blogger Tagged Typepad Freewebs BlackPlanet gigya icons

All comments

Add a comment on Slide 1

If you have a SlideShare account, login to comment; else you can comment as a guest


Showing 1-50 of 0 (more)

Apache Sanselan (ApacheCon US 2007 FFT)

From cziegeler, 4 months ago

Presentation from the ApacheCon US 2007 in Atlanta.

171 views  |  0 comments  |  0 favorites  |  1 download
 

Groups / Events

 

 
Embed
options

More Info

This slideshow is Public
Total Views: 171
on Slideshare: 171
from embeds: 0

Slideshow transcript

Slide 1: Apache Sanselan

Slide 2: Apache Sanselan • A pure-Java image library • Reading and writing of images • Support for various image formats • Extracting image meta information 2

Slide 3: History of Sanselan • Initiated by Charles M. Chen in 2004 • Open source since 2004 – Apache Licence • Stable code base • Used by several projects • Entered incubator in September 3

Slide 4: Features of Sanselan • Portable toolkit (pure Java) • Correctness over performance • Not tied to files – Byte arrays, input streams • Simple but powerful API 4

Slide 5: Features of Sanselan • File format identification • Fast extraction (without reading the image data) of – image info – icc profile – image metadata • Reading and writing

Slide 6: Supported Formats PNG • GIF • • TIFF (EXIF support) • BMP • PNM/PGM/PBM/PPM • ICO, PSD/Photoshop (read only) • JPEG (read only) – EXIF support

Slide 7: Code Samples // how to read an image: byte imageBytes[] = someBytes; BufferedImage image_1 = Sanselan.getBufferedImage(imageBytes); // Write an image. BufferedImage image = someImage; File dst = someFile; ImageFormat format = ImageFormat.IMAGE_FORMAT_PNG; Map optional_params = new Hashtable(); Sanselan.write(image, dst, format, optional_params);

Slide 8: Code Samples // get the image's width and height. Dimension d = Sanselan.getImageSize(imageBytes); // get all of the image's info (ie. bits per pixel, size, // transparency, etc.) ImageInfo image_info = Sanselan.getImageInfo(imageBytes); if (image_info.getColorType() == ImageInfo.COLOR_TYPE_GRAYSCALE) System.out.println("Grayscale image."); if (image_info.getHeight() > 1000) System.out.println("Large image.");

Slide 9: Code Samples // try to guess the image's format. ImageFormat image_format = Sanselan.guessFormat(imageBytes); image_format.equals( ImageFormat.IMAGE_FORMAT_PNG); // get all metadata stored in EXIF format // (ie. from JPEG or TIFF). IImageMetadata metdata = Sanselan.getMetadata(imageBytes);

Slide 10: Sanselan Today – Check It Out • Code base is in SVN – Buildable with Maven 2 • Paper work is finished • Website is set up – Documentation will follow soon :) • Incubator release (stable code base) soon • Future: growth – features and community 10

Slide 11: Q&A