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

Quick Search    Search Deep

com.anotherbigidea.flash.movie
Class ImageUtil  view ImageUtil download ImageUtil.java

java.lang.Object
  extended bycom.anotherbigidea.flash.movie.ImageUtil

public class ImageUtil
extends java.lang.Object

Utilities for dealing with images


Constructor Summary
ImageUtil()
           
 
Method Summary
static Image.Lossless createLosslessImage(java.awt.Image image, int format, boolean hasAlpha)
          Create a lossless Image object from an AWT Image - the awt image must be fully loaded and ready.
static byte[] normalizeJPEG(java.io.InputStream jpegImage, int[] size)
          Normalize a JPEG to ensure that it is "Baseline" rather than "Progressive".
static Shape shapeForImage(Image image, double width, double height)
          Create a Shape for the image.
static Shape shapeForImage(java.io.InputStream jpegImage, int[] size)
          Create a Shape for the image.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageUtil

public ImageUtil()
Method Detail

normalizeJPEG

public static byte[] normalizeJPEG(java.io.InputStream jpegImage,
                                   int[] size)
                            throws java.io.IOException
Normalize a JPEG to ensure that it is "Baseline" rather than "Progressive". The Flash player doesn't like "Progressive".


shapeForImage

public static Shape shapeForImage(java.io.InputStream jpegImage,
                                  int[] size)
                           throws java.io.IOException
Create a Shape for the image. The resulting shape uses the image as a clipped image fill. The shape is a rectangle just the right size to show the entire image and its origin is at the top left. Additional geometry vectors may be added to the shape if required.


shapeForImage

public static Shape shapeForImage(Image image,
                                  double width,
                                  double height)
Create a Shape for the image. The resulting shape uses the image as a clipped image fill. The shape is a rectangle just the right size to show the entire image and its origin is at the top left. Additional geometry vectors may be added to the shape if required.


createLosslessImage

public static Image.Lossless createLosslessImage(java.awt.Image image,
                                                 int format,
                                                 boolean hasAlpha)
Create a lossless Image object from an AWT Image - the awt image must be fully loaded and ready.