ccs.cpc
Class CpcImage

java.lang.Object
  extended by ccs.cpc.CpcImage

public class CpcImage
extends java.lang.Object

An annotated version of an image, to be returned by CpcImageDecoders.


Constructor Summary
CpcImage(java.awt.Image img, int sourceSize, boolean isAnim)
          Construct a CpcImage.
 
Method Summary
 int getApproxSize()
          Returns the approximate uncompressed size.
 java.awt.Image getImage()
           
 int getSourceSize()
          Returns the size of the compressed image data.
 boolean isAnimated()
           
 int tag()
          Return the image's tag number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CpcImage

public CpcImage(java.awt.Image img,
                int sourceSize,
                boolean isAnim)
Construct a CpcImage.

Parameters:
img - The ifmage.
isAnim - Whether the image is animated. Some image objects contain multiple frames, and can be crudely animated because drawImage returns the frames in sequence, once per call. Set to true if your image supports this kind of animation. (In particular, this works with animated GIFs.) If unsure, set true - it's usually harmless.
Method Detail

getImage

public java.awt.Image getImage()

isAnimated

public boolean isAnimated()

getApproxSize

public int getApproxSize()
Returns the approximate uncompressed size. This is fairly crude: it assumes three bytes per pixel and only one frame.


getSourceSize

public int getSourceSize()
Returns the size of the compressed image data.


tag

public int tag()
Return the image's tag number. Debugging aid.