Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.RuntimeCollective.content
Class Thumbnail  view Thumbnail download Thumbnail.java

java.lang.Object
  extended bycom.RuntimeCollective.content.Thumbnail

public class Thumbnail
extends java.lang.Object

The Thumbnail class contains static methods to create a Thumbnail from an Image.

It relies on the thumbnailQuality RuntimeParameter to be set; this should be a number between 0 and 100, corresponding to JPEG encoding quality for the resultant thumbnail.

It borrows heavily from http://www.geocities.com/marcoschmidt.geo/java-save-jpeg-thumbnail.html - thanks, Marco!

Version:
$Id: Thumbnail.java,v 1.5 2003/09/30 15:12:45 joe Exp $

Constructor Summary
Thumbnail()
           
 
Method Summary
static com.RuntimeCollective.content.bean.File createThumbnail(com.RuntimeCollective.content.bean.File file)
          Create a thumbnail from the given file, using the maximum size specified by the RuntimeParameter thumbnailMaxSize.
static com.RuntimeCollective.content.bean.File createThumbnail(com.RuntimeCollective.content.bean.File file, int maxSize)
          Create a thumbnail from the given file, using the specified maximum size.
static com.RuntimeCollective.content.bean.File createThumbnail(com.RuntimeCollective.content.bean.File file, int width, int height)
          Create a thumbnail from the given file, using the specified width and height.
private static com.RuntimeCollective.content.bean.File createThumbnail(java.awt.Image image, int width, int height)
          Create a thumbnail from the given java.awt.Image, using the specified width and height
private static java.awt.Image getAwtImageFromJosephineFile(com.RuntimeCollective.content.bean.File file)
          Get a java.awt.Image from a com.RuntimeCollective.content.bean.File
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Thumbnail

public Thumbnail()
Method Detail

createThumbnail

public static com.RuntimeCollective.content.bean.File createThumbnail(com.RuntimeCollective.content.bean.File file)
                                                               throws java.io.IOException
Create a thumbnail from the given file, using the maximum size specified by the RuntimeParameter thumbnailMaxSize.


createThumbnail

public static com.RuntimeCollective.content.bean.File createThumbnail(com.RuntimeCollective.content.bean.File file,
                                                                      int maxSize)
                                                               throws java.io.IOException
Create a thumbnail from the given file, using the specified maximum size.


createThumbnail

public static com.RuntimeCollective.content.bean.File createThumbnail(com.RuntimeCollective.content.bean.File file,
                                                                      int width,
                                                                      int height)
                                                               throws java.io.IOException
Create a thumbnail from the given file, using the specified width and height.


createThumbnail

private static com.RuntimeCollective.content.bean.File createThumbnail(java.awt.Image image,
                                                                       int width,
                                                                       int height)
                                                                throws java.io.IOException
Create a thumbnail from the given java.awt.Image, using the specified width and height


getAwtImageFromJosephineFile

private static java.awt.Image getAwtImageFromJosephineFile(com.RuntimeCollective.content.bean.File file)
                                                    throws java.io.IOException
Get a java.awt.Image from a com.RuntimeCollective.content.bean.File