public final class ImageInfo extends Object
Example:
final ImageInfo info = ImageInfo.get(Medias.create("dot.png")); Assert.assertEquals(64, info.getWidth()); Assert.assertEquals(32, info.getHeight()); Assert.assertEquals("png", info.getFormat());
This class is Thread-Safe.
Modifier and Type | Method and Description |
---|---|
static ImageInfo |
get(Media media)
Get the image info of the specified image media.
|
ImageFormat |
getFormat()
Get image format.
|
int |
getHeight()
Get image height.
|
int |
getWidth()
Get image width.
|
static boolean |
isImage(Media media)
Check if the media is a valid image.
|
public static ImageInfo get(Media media)
media
- The media.LionEngineException
- If media is null
or cannot be read.public static boolean isImage(Media media)
media
- The media reference.true
if is supported image, false
else.public int getWidth()
public int getHeight()
public ImageFormat getFormat()
Copyright © 2016 Byron 3D Games Studio. All rights reserved.