GCKImage Class
Stay organized with collections
Save and categorize content based on your preferences.
A class that represents an image that is located on a web server.
Used for such things as GCKDevice icons and GCKMediaMetadata artwork.
Inherits NSObject, <NSCopying>, and <NSCoding>.
- (instancetype) initWithURL: |
|
(NSURL *) |
URL |
width: |
|
(NSInteger) |
width |
height: |
|
(NSInteger) |
height |
|
|
| |
Constructs a new GCKImage 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. |
Default initializer is not available.
The image width, in pixels.
The image height, in pixels.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eGCKImage\u003c/code\u003e class represents an image located on a web server, used for device icons and media metadata artwork.\u003c/p\u003e\n"],["\u003cp\u003eIt provides properties to store the image URL, width, and height.\u003c/p\u003e\n"],["\u003cp\u003eYou can create a \u003ccode\u003eGCKImage\u003c/code\u003e instance using the designated initializer \u003ccode\u003einitWithURL:width:height:\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe default initializer \u003ccode\u003einit\u003c/code\u003e is not available for this class.\u003c/p\u003e\n"]]],[],null,["# GCKImage Class\n\n[Instance Methods](#pub-methods) \\| [Properties](#properties) \nGCKImage Class Reference \n\nOverview\n--------\n\nA class that represents an image that is located on a web server.\n\nUsed for such things as [GCKDevice](/cast/v3/reference/ios/interface_g_c_k_device \"An object representing a receiver device. \") icons and [GCKMediaMetadata](/cast/v3/reference/ios/interface_g_c_k_media_metadata \"A container for media metadata. \") artwork.\n\nInherits NSObject, \\\u003cNSCopying\\\u003e, and \\\u003cNSCoding\\\u003e.\n\n|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Instance Method Summary ----------------------- ||\n| (instancetype) | - [initWithURL:width:height:](/cast/v3/reference/ios/interface_g_c_k_image#a20f5e64c10e78d2672b1dfa20ff0b76f) |\n| | Constructs a new [GCKImage](/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...](#a20f5e64c10e78d2672b1dfa20ff0b76f) |\n| ||\n| (instancetype) | - [init](/cast/v3/reference/ios/interface_g_c_k_image#af03b299c34947ba97027cf2603f95c4b) |\n| | Default initializer is not available. [More...](#af03b299c34947ba97027cf2603f95c4b) |\n| ||\n\n|-----------|------------------------------------------------------------------------------------------|\n| Property Summary ---------------- ||\n| NSURL \\* | [URL](/cast/v3/reference/ios/interface_g_c_k_image#a1a70791ad8a7ce7920043c12196b88e5) |\n| | The image URL. [More...](#a1a70791ad8a7ce7920043c12196b88e5) |\n| ||\n| NSInteger | [width](/cast/v3/reference/ios/interface_g_c_k_image#a7ec3d003921bed52ba5ad837e0d5a3d8) |\n| | The image width, in pixels. [More...](#a7ec3d003921bed52ba5ad837e0d5a3d8) |\n| ||\n| NSInteger | [height](/cast/v3/reference/ios/interface_g_c_k_image#a9ca09c90d7659f36990e95c257764c66) |\n| | The image height, in pixels. [More...](#a9ca09c90d7659f36990e95c257764c66) |\n| ||\n\nMethod Detail\n-------------\n\n|-------------------------------|---|-------------|----------|\n| - (instancetype) initWithURL: | | (NSURL \\*) | *URL* |\n| width: | | (NSInteger) | *width* |\n| height: | | (NSInteger) | *height* |\n| | | | |\n\nConstructs a new [GCKImage](/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.\n\nDesignated initializer.\n\nParameters\n:\n\n |--------|-------------------------------------|\n | URL | The URL of the image. |\n | width | The width of the image, in pixels. |\n | height | The height of the image, in pixels. |\n\n\nExceptions\n:\n\n |----------------------------|--------------------------------------------------------------|\n | NSInvalidArgumentException | if the URL is `nil` or empty, or the dimensions are invalid. |\n\n\n|-----------------------|---|---|---|\n| - (instancetype) init | | | |\n\nDefault initializer is not available.\n\nProperty Detail\n---------------\n\n|-----------------------------------------|---------------------|\n| |-----------------| | - (NSURL\\*) URL | | readnonatomicstrong |\n\nThe image URL. \n\n|-------------------------------------------------|---------------------|\n| |---------------------| | - (NSInteger) width | | readnonatomicassign |\n\nThe image width, in pixels. \n\n|---------------------------------------------------|---------------------|\n| |----------------------| | - (NSInteger) height | | readnonatomicassign |\n\nThe image height, in pixels."]]