---
title: "init(rawPixelFormatType:)"
framework: avfoundation
role: symbol
role_heading: Initializer
path: "avfoundation/avcapturephotosettings/init(rawpixelformattype:)"
---

# init(rawPixelFormatType:)

Creates a photo settings object for RAW-format-only capture with the specified pixel format.

## Declaration

```swift
convenience init(rawPixelFormatType: OSType)
```

## Parameters

- `rawPixelFormatType`: The Bayer RAW pixel format type to use for capture. This value must be one of the format identifiers listed in the doc://com.apple.avfoundation/documentation/AVFoundation/AVCapturePhotoOutput/availableRawPhotoPixelFormatTypes-5fatm array of your photo capture output.

## Return Value

Return Value A new photo settings object.

## Discussion

Discussion Use this initializer for RAW-only capture. To capture an image in both RAW format and a processed format (such as JPEG), use the init(rawPixelFormatType:processedFormat:) initializer instead. Requesting RAW format capture adds requirements for other photo settings: for details, see the rawPhotoPixelFormatType property. The capture output validates these requirements when you call the capturePhoto(with:delegate:) method. If your settings and delegate don’t meet these requirements, that method raises an exception.

## See Also

### Creating photo settings

- [init(format:)](avfoundation/avcapturephotosettings/init(format:).md)
- [init(rawPixelFormatType:processedFormat:)](avfoundation/avcapturephotosettings/init(rawpixelformattype:processedformat:).md)
- [init(rawPixelFormatType:rawFileType:processedFormat:processedFileType:)](avfoundation/avcapturephotosettings/init(rawpixelformattype:rawfiletype:processedformat:processedfiletype:).md)
- [init(from:)](avfoundation/avcapturephotosettings/init(from:).md)
