---
title: AVCapturePhotoFileDataRepresentationCustomizer
framework: avfoundation
role: symbol
role_heading: Protocol
path: avfoundation/avcapturephotofiledatarepresentationcustomizer
---

# AVCapturePhotoFileDataRepresentationCustomizer

A protocol that defines the methods to implement to customize the packaging of photo data.

## Declaration

```swift
protocol AVCapturePhotoFileDataRepresentationCustomizer : NSObjectProtocol
```

## Mentioned in

Capturing photos in RAW and Apple ProRAW formats

## Overview

Overview AVCapturePhoto is a wrapper representing a photo in a file container. To flatten the photo to an NSData object to write to file, call fileDataRepresentation(). For more complex flattening operations such as replacing or stripping metadata, call fileDataRepresentation(with:) and provide a delegate for customized replacement or stripping behavior. This delegate’s methods are called synchronously before the flattening process begins.

## Topics

### Replacing or removing metadata

- [replacementMetadata(for:)](avfoundation/avcapturephotofiledatarepresentationcustomizer/replacementmetadata(for:).md)
- [replacementEmbeddedThumbnailPixelBuffer(withPhotoFormat:for:)](avfoundation/avcapturephotofiledatarepresentationcustomizer/replacementembeddedthumbnailpixelbuffer(withphotoformat:for:).md)
- [replacementDepthData(for:)](avfoundation/avcapturephotofiledatarepresentationcustomizer/replacementdepthdata(for:).md)
- [replacementPortraitEffectsMatte(for:)](avfoundation/avcapturephotofiledatarepresentationcustomizer/replacementportraiteffectsmatte(for:).md)
- [replacementSemanticSegmentationMatte(ofType:for:)](avfoundation/avcapturephotofiledatarepresentationcustomizer/replacementsemanticsegmentationmatte(oftype:for:).md)
- [replacementAppleProRAWCompressionSettings(for:defaultSettings:maximumBitDepth:)](avfoundation/avcapturephotofiledatarepresentationcustomizer/replacementappleprorawcompressionsettings(for:defaultsettings:maximumbitdepth:).md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Packaging data for file output

- [fileDataRepresentation(with:)](avfoundation/avcapturephoto/filedatarepresentation(with:).md)
- [fileDataRepresentation()](avfoundation/avcapturephoto/filedatarepresentation().md)
- [cgImageRepresentation()](avfoundation/avcapturephoto/cgimagerepresentation().md)
- [previewCGImageRepresentation()](avfoundation/avcapturephoto/previewcgimagerepresentation().md)
- [fileDataRepresentation(withReplacementMetadata:replacementEmbeddedThumbnailPhotoFormat:replacementEmbeddedThumbnailPixelBuffer:replacementDepthData:)](avfoundation/avcapturephoto/filedatarepresentation(withreplacementmetadata:replacementembeddedthumbnailphotoformat:replacementembeddedthumbnailpixelbuffer:replacementdepthdata:).md)
