---
title: "readBytes(_:dataLayout:bytesPerRow:region:featureChannelInfo:imageIndex:)"
framework: metalperformanceshaders
role: symbol
role_heading: Instance Method
path: "metalperformanceshaders/mpsimage/readbytes(_:datalayout:bytesperrow:region:featurechannelinfo:imageindex:)"
---

# readBytes(_:dataLayout:bytesPerRow:region:featureChannelInfo:imageIndex:)

## Declaration

```swift
func readBytes(_ dataBytes: UnsafeMutableRawPointer, dataLayout: MPSDataLayout, bytesPerRow: Int, region: MTLRegion, featureChannelInfo: MPSImageReadWriteParams, imageIndex: Int)
```

## See Also

### Methods to Read and Write Raw Data

- [readBytes(_:dataLayout:imageIndex:)](metalperformanceshaders/mpsimage/readbytes(_:datalayout:imageindex:).md)
- [writeBytes(_:dataLayout:bytesPerRow:region:featureChannelInfo:imageIndex:)](metalperformanceshaders/mpsimage/writebytes(_:datalayout:bytesperrow:region:featurechannelinfo:imageindex:).md)
- [writeBytes(_:dataLayout:imageIndex:)](metalperformanceshaders/mpsimage/writebytes(_:datalayout:imageindex:).md)
- [MPSImageReadWriteParams](metalperformanceshaders/mpsimagereadwriteparams.md)
- [MPSDataLayout](metalperformanceshaders/mpsdatalayout.md)
