Save MPSImage to a file

On iPhone, how can I save MPSImage to a file?

Replies

use this API getBytes(_:bytesPerRow:bytesPerImage:from:mipmapLevel:slice:) with MPSImage.texture



https://developer.apple.com/documentation/metal/mtltexture/1516318-getbytes



then write bytes to file