<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSPICTImageRep/init(data:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSPICTImageRep(im)initWithData:"
  },
  "title" : "init(data:)"
}
-->

# init(data:)

Returns a representation of an image from the specified data in the PICT file format.

```
init?(data pictData: Data)
```

## Parameters

`pictData`

A data object containing the PICT data.

## Return Value

An initialized [`NSPICTImageRep`](/documentation/AppKit/NSPICTImageRep), or `nil` if the object could not be initialized. Initialization may fail if the data does not conform to the PICT file format.

## Discussion

If the PICT data is obtained directly from a PICT file or document, this method ignores most of the 512-byte header that occurs before the start of the actual picture data. It may retrieve some relevant meta information from the header.

## See Also

[`imageRepWithData:`](/documentation/AppKit/NSPICTImageRep/imageRepWithData:)

Creates and returns a representation of an image from the specified data in the PICT file format.

[`pictRepresentation`](/documentation/AppKit/NSPICTImageRep/pictRepresentation)

The image representation’s PICT data.



---

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)