anvil.core.io
Class ImageSize

java.lang.Object
  |
  +--anvil.core.io.ImageSize

public final class ImageSize
extends java.lang.Object


Field Summary
static int[] GIF_HEADER
           
static int[] JPEG_HEADER
           
static int[] PNG_HEADER
           
 
Constructor Summary
ImageSize(java.lang.String ctype, int w, int h, int c)
           
 
Method Summary
static ImageSize forGIF(java.io.RandomAccessFile file)
           
static ImageSize forImage(java.io.File file)
           
static ImageSize forImage(java.io.RandomAccessFile file)
           
static ImageSize forJPEG(java.io.RandomAccessFile file)
           
static ImageSize forPNG(java.io.RandomAccessFile file)
           
 int getColors()
           
 java.lang.String getContentType()
           
 int getHeight()
           
 int getWidth()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GIF_HEADER

public static final int[] GIF_HEADER

PNG_HEADER

public static final int[] PNG_HEADER

JPEG_HEADER

public static final int[] JPEG_HEADER
Constructor Detail

ImageSize

public ImageSize(java.lang.String ctype,
                 int w,
                 int h,
                 int c)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getContentType

public java.lang.String getContentType()

getHeight

public int getHeight()

getWidth

public int getWidth()

getColors

public int getColors()

forImage

public static final ImageSize forImage(java.io.File file)
                                throws java.io.IOException
java.io.IOException

forImage

public static final ImageSize forImage(java.io.RandomAccessFile file)
                                throws java.io.IOException
java.io.IOException

forGIF

public static final ImageSize forGIF(java.io.RandomAccessFile file)
                              throws java.io.IOException
java.io.IOException

forPNG

public static final ImageSize forPNG(java.io.RandomAccessFile file)
                              throws java.io.IOException
java.io.IOException

forJPEG

public static final ImageSize forJPEG(java.io.RandomAccessFile file)
                               throws java.io.IOException
java.io.IOException