<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NowPlaying",
  "identifier" : "/documentation/NowPlaying/ArtworkRepresentation/init(data:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Now Playing"
    ],
    "preciseIdentifier" : "s:10NowPlaying21ArtworkRepresentationV4dataAC10Foundation4DataV_tKcfc"
  },
  "title" : "init(data:)"
}
-->

# init(data:)

Creates an [`ArtworkRepresentation`](/documentation/NowPlaying/ArtworkRepresentation) from image data.

```
init(data: Data) throws
```

## Parameters

`data`

The encoded image data.

## Discussion> Throws: ``doc://com.apple.nowplaying/documentation/NowPlaying/ArtworkRepresentation/ArtworkRepresentationError/noRepresentationAvailable`` if the data
> doesn’t represent a valid image or uses an unsupported format.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)