java.lang.Object
com.anotherbigidea.flash.movie.ImageUtil
- public class ImageUtil
- extends java.lang.Object
Utilities for dealing with images
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImageUtil
public ImageUtil()
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.