Package com.google.appengine.api.images
Interface Image
-
- All Superinterfaces:
Serializable
public interface Image extends Serializable
Imagerepresents an image that can be manipulated by theImagesService.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classImage.FormatImage formats usable by the images api.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @Nullable BlobKeygetBlobKey()If this image is backed by a blob, return the associatedBlobKey.@Nullable Image.FormatgetFormat()Gets the encoding format of the image.intgetHeight()Gets the height of the image.byte @Nullable []getImageData()Gets the raw imageData of the image.intgetWidth()Gets the width of the image.voidsetImageData(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:
IllegalArgumentException- If theimageDataprovided is invalid
-
getHeight
int getHeight()
Gets the height of the image.- Returns:
- image height
- Throws:
IllegalArgumentException- If theimageDataprovided is invalid
-
getFormat
@Nullable Image.Format getFormat()
Gets the encoding format of the image.- Returns:
- image format
- Throws:
IllegalArgumentException- If theimageDataprovided is invalid
-
getImageData
byte @Nullable [] 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:
IllegalArgumentException- IfimageDatais null or empty
-
-