org.objectweb.jac.util
Class Images
java.lang.Object
org.objectweb.jac.util.Images
- public class Images
- extends Object
Contains various methods related to image files
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PNG_SIG
protected static final byte[] PNG_SIG
GIF87A_SIG
protected static final byte[] GIF87A_SIG
GIF89A_SIG
protected static final byte[] GIF89A_SIG
JFIF_SIG
protected static final byte[] JFIF_SIG
Images
public Images()
getImageFileSize
public static Dimension getImageFileSize(File img)
throws IOException
- Tells the size of an image. Supported formats are GIF and PNG.
- Parameters:
img
- the file of the image
- Returns:
- The size of the image, null if the image format is unhandled
- Throws:
IOException
- See Also:
getImageSize(InputStream)
getImageSize
public static Dimension getImageSize(InputStream img)
throws IOException
- Tells the size of an image. Supported formats are GIF and PNG.
- Parameters:
img
- the data of the image
- Returns:
- The size of the image, null if the image format is unhandled
- Throws:
IOException
- See Also:
getImageFileSize(File)