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

Quick Search    Search Deep

com.anotherbigidea.flash.movie
Class Image.Lossless  view Image.Lossless download Image.Lossless.java

java.lang.Object
  extended bycom.anotherbigidea.flash.movie.Symbol
      extended bycom.anotherbigidea.flash.movie.Image
          extended bycom.anotherbigidea.flash.movie.Image.Lossless
Enclosing class:
Image

public static class Image.Lossless
extends Image

A lossless image (similar to PNG). There are 3 formats - 8, 16 and 32 bit. For 8 and 16 bit images there is a color table and the image data consists of either an 8 or 16 bit index into the table for each pixel. 32 bit images have no color table - each pixel consists of 4 bytes: (alpha,red,green,blue). If there is no alpha then the first byte will be 255. For all formats, the length of each row of pixel data must be a multiple of 32 bits. If the actual row data is smaller then it should be padded up to next multiple of 32 bits.


Nested Class Summary
 
Nested classes inherited from class com.anotherbigidea.flash.movie.Image
Image.JPEG, Image.Lossless
 
Field Summary
protected  com.anotherbigidea.flash.structs.Color[] colorTable
           
protected  int format
           
protected  boolean hasAlpha
           
protected  double height
           
protected  byte[] imageData
           
protected  double width
           
 
Fields inherited from class com.anotherbigidea.flash.movie.Symbol
id
 
Constructor Summary
Image.Lossless(com.anotherbigidea.flash.structs.Color[] colorTable, byte[] imageData, double width, double height, boolean hasAlpha, int format)
           
 
Method Summary
protected  int defineSymbol(Movie movie, com.anotherbigidea.flash.interfaces.SWFTagTypes timelineWriter, com.anotherbigidea.flash.interfaces.SWFTagTypes definitionWriter)
          Override to provide symbol definition
 com.anotherbigidea.flash.structs.Color[] getColorTable()
           
 int getFormat()
           
 double getHeight()
           
 byte[] getImageData()
           
 double getWidth()
           
 boolean hasAlpha()
           
 
Methods inherited from class com.anotherbigidea.flash.movie.Symbol
define, getId, getNextId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

imageData

protected byte[] imageData

colorTable

protected com.anotherbigidea.flash.structs.Color[] colorTable

width

protected double width

height

protected double height

hasAlpha

protected boolean hasAlpha

format

protected int format
Constructor Detail

Image.Lossless

public Image.Lossless(com.anotherbigidea.flash.structs.Color[] colorTable,
                      byte[] imageData,
                      double width,
                      double height,
                      boolean hasAlpha,
                      int format)
Method Detail

getImageData

public byte[] getImageData()

getColorTable

public com.anotherbigidea.flash.structs.Color[] getColorTable()

getWidth

public double getWidth()

getHeight

public double getHeight()

hasAlpha

public boolean hasAlpha()

getFormat

public int getFormat()

defineSymbol

protected int defineSymbol(Movie movie,
                           com.anotherbigidea.flash.interfaces.SWFTagTypes timelineWriter,
                           com.anotherbigidea.flash.interfaces.SWFTagTypes definitionWriter)
                    throws java.io.IOException
Description copied from class: Symbol
Override to provide symbol definition

Specified by:
defineSymbol in class Symbol