Package com.day.image
Class ImageSupport
- java.lang.Object
 - 
- com.day.image.ImageSupport
 
 
- 
public class ImageSupport extends java.lang.ObjectTheImageSupportclass provides methods, which are implemented differently for Java 1.3 and for Java 1.4. These methods are implemented as public static methods, which delegate to protected instance methods of implementations of this abstract class.- Since:
 - coati
 
 
- 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.awt.image.BufferedImagecoerceData(java.awt.image.BufferedImage image, boolean isAlphaPremultiplied)Forces the data to match the state specified in theisAlphaPremultipliedvariable.static voidderegisterImageIOSpi()Deregisters the GIF Image writer to be used depending on the Java runtime from the ImageIO registry.static voidregisterImageIOSpi()Registers the GIF Image writer to be used depending on the Java runtime to the ImageIO registry. 
 - 
 
- 
- 
Method Detail
- 
coerceData
public static java.awt.image.BufferedImage coerceData(java.awt.image.BufferedImage image, boolean isAlphaPremultiplied)Forces the data to match the state specified in theisAlphaPremultipliedvariable. It may multiply or divide the color raster data by alpha, or do nothing if the data is in the correct state.NOTE: Due to a bug in the
DirectColorModel.coerceDataimplementation of Java 1.3 we have to hack this in using the implementation of Java 1.4 for the 1.3 version and delegating to the library implementation for the 1.4 version.- Parameters:
 image- The image to apply the alpha channel for.isAlphaPremultiplied-trueif the alpha has been premultiplied;falseotherwise.- Returns:
 - The image with correct state. Depending on the implementation and
      the real need for coercion, the image may or may not be the same as
      the input 
image. Callers should not assume to get a different image or even different raster data object. 
 
- 
registerImageIOSpi
public static void registerImageIOSpi()
Registers the GIF Image writer to be used depending on the Java runtime to the ImageIO registry. If the image writer has already been registered, this method has no effect. 
- 
deregisterImageIOSpi
public static void deregisterImageIOSpi()
Deregisters the GIF Image writer to be used depending on the Java runtime from the ImageIO registry. If the image writer is not registered, this method has no effect. 
 - 
 
 -