# Interface Image (5.0.3)

    public interface Image extends Serializable

`Image` represents an image that can be manipulated by the
[ImagesService](https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.images.ImagesService).

## Implements

[Serializable](https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html)

## Methods

### getBlobKey()

    public abstract @Nullable BlobKey getBlobKey()

If this image is backed by a blob, return the associated [BlobKey](https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.blobstore.BlobKey). If this method returns non-`null`, none of the
other methods will currently be available.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.appengine.api.blobstore.@org.jspecify.annotations.Nullable BlobKey` |   |

### getFormat()

    public abstract Image.@Nullable Format getFormat()

Gets the encoding format of the image.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.appengine.api.images.Image.@org.jspecify.annotations.Nullable Format` | image format |

### getHeight()

    public abstract int getHeight()

Gets the height of the image.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | image height |

### getImageData()

    public abstract byte @Nullable [] getImageData()

Gets the raw imageData of the image.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `byte @org.jspecify.annotations.Nullable []` | the image data of the image |

### getWidth()

    public abstract int getWidth()

Gets the width of the image.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | image width |

### setImageData(byte\[\] imageData)

    public abstract void setImageData(byte[] imageData)

Sets the image to contain the image data contained in `imageData`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `imageData` | `byte[]` new image data for the image to store |