Exemplo n.º 1
0
 /**
  * Constructs an <code>EncodedImageReference</code> with an image.
  *
  * @param image A java.awt.Image to be displayed. If you intend to extend this class and override
  *     the getImage() method to return images only as they are needed, then you may pass null to
  *     this parameter.
  */
 public EncodedImageReference(Image image) {
   this.internalImage = image;
   if (image != null && ImageKit.hasAlphaChannel(image)) encoder = new GifEncoder();
   else encoder = new PngEncoder();
   refEncodedBytes = new SoftReference(null);
   keptInMemory = false;
   valid = false;
 }