# GCKImage Class

[Instance Methods](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_image#pub-methods) \| [Properties](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_image#properties) GCKImage Class Reference

## Overview

A class that represents an image that is located on a web server.

Used for such things as [GCKDevice](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_device "An object representing a receiver device. ") icons and [GCKMediaMetadata](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_metadata "A container for media metadata. ") artwork.

Inherits NSObject, \<NSCopying\>, and \<NSCoding\>.

|---|---|
| ## Instance Method Summary ||
| (instancetype) | - [initWithURL:width:height:](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_image#a20f5e64c10e78d2672b1dfa20ff0b76f) |
|   | Constructs a new [GCKImage](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_image "A class that represents an image that is located on a web server. ") with the given URL and dimensions. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_image#a20f5e64c10e78d2672b1dfa20ff0b76f) |
|   ||
| (instancetype) | - [init](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_image#af03b299c34947ba97027cf2603f95c4b) |
|   | Default initializer is not available. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_image#af03b299c34947ba97027cf2603f95c4b) |
|   ||

|---|---|
| ## Property Summary ||
| NSURL \* | [URL](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_image#a1a70791ad8a7ce7920043c12196b88e5) |
|   | The image URL. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_image#a1a70791ad8a7ce7920043c12196b88e5) |
|   ||
| NSInteger | [width](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_image#a7ec3d003921bed52ba5ad837e0d5a3d8) |
|   | The image width, in pixels. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_image#a7ec3d003921bed52ba5ad837e0d5a3d8) |
|   ||
| NSInteger | [height](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_image#a9ca09c90d7659f36990e95c257764c66) |
|   | The image height, in pixels. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_image#a9ca09c90d7659f36990e95c257764c66) |
|   ||

## Method Detail

|---|---|---|---|
| - (instancetype) initWithURL: |   | (NSURL \*) | *URL* |
| width: |   | (NSInteger) | *width* |
| height: |   | (NSInteger) | *height* |
|   |   |   |   |

Constructs a new [GCKImage](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_image "A class that represents an image that is located on a web server. ") with the given URL and dimensions.

Designated initializer.

Parameters
:

    |---|---|
    | URL | The URL of the image. |
    | width | The width of the image, in pixels. |
    | height | The height of the image, in pixels. |


Exceptions
:

    |---|---|
    | NSInvalidArgumentException | if the URL is `nil` or empty, or the dimensions are invalid. |


|---|---|---|---|
| - (instancetype) init |   |   |   |

Default initializer is not available.

## Property Detail

|---|---|
| |---| | - (NSURL\*) URL | | readnonatomicstrong |

The image URL.

|---|---|
| |---| | - (NSInteger) width | | readnonatomicassign |

The image width, in pixels.

|---|---|
| |---| | - (NSInteger) height | | readnonatomicassign |

The image height, in pixels.