com.google.appengine.api.images
Interface Image
-
- All Superinterfaces:
- java.io.Serializable
public interface Image extends java.io.Serializable
Image
represents an image that can be manipulated by theImagesService
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface and Description static class
Image.Format
Image formats usable by the images api.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description BlobKey
getBlobKey()
If this image is backed by a blob, return the associatedBlobKey
.Image.Format
getFormat()
Gets the encoding format of the image.int
getHeight()
Gets the height of the image.byte[]
getImageData()
Gets the raw imageData of the image.int
getWidth()
Gets the width of the image.void
setImageData(byte[] imageData)
Sets the image to contain the image data contained inimageData
.
-
-
-
Method Detail
-
getWidth
int getWidth()
Gets the width of the image.- Returns:
- image width
- Throws:
java.lang.IllegalArgumentException
- If theimageData
provided is invalid
-
getHeight
int getHeight()
Gets the height of the image.- Returns:
- image height
- Throws:
java.lang.IllegalArgumentException
- If theimageData
provided is invalid
-
getFormat
Image.Format getFormat()
Gets the encoding format of the image.- Returns:
- image format
- Throws:
java.lang.IllegalArgumentException
- If theimageData
provided is invalid
-
getImageData
byte[] getImageData()
Gets the raw imageData of the image.- Returns:
- the image data of the image
-
setImageData
void setImageData(byte[] imageData)
Sets the image to contain the image data contained inimageData
.- Parameters:
imageData
- new image data for the image to store- Throws:
java.lang.IllegalArgumentException
- IfimageData
is null or empty
-
-