---
title: "mip(data:bytesPerRow:bytesPerImage:)"
framework: realitykit
role: symbol
role_heading: Type Method
path: "realitykit/textureresource/contents/mipmaplevel/mip(data:bytesperrow:bytesperimage:)"
---

# mip(data:bytesPerRow:bytesPerImage:)

Specifies a multi-image mipmap level of a texture resource with pixel data that RealityKit copies from a byte buffer.

## Declaration

```swift
static func mip(data: Data, bytesPerRow: Int, bytesPerImage: Int) -> TextureResource.Contents.MipmapLevel
```

## Parameters

- `data`: The source buffer.
- `bytesPerRow`: The stride in bytes between rows of texture data that RealityKit stores in the source buffer. The value needs to be a multiple of the destination texture’s pixel size, in bytes.
- `bytesPerImage`: The stride in bytes between image planes of texture data that RealityKit stores in the source buffer, needed for 3D texture mipmaps. The value needs to be a multiple of the destination texture’s pixel size, in bytes.

## See Also

### Creating a texture mipmap level

- [mip(data:bytesPerRow:)](realitykit/textureresource/contents/mipmaplevel/mip(data:bytesperrow:).md)
- [mip(slices:)](realitykit/textureresource/contents/mipmaplevel/mip(slices:).md)
- [mip(unsafeBuffer:offset:size:bytesPerRow:)](realitykit/textureresource/contents/mipmaplevel/mip(unsafebuffer:offset:size:bytesperrow:).md)
- [mip(unsafeBuffer:offset:size:bytesPerRow:bytesPerImage:)](realitykit/textureresource/contents/mipmaplevel/mip(unsafebuffer:offset:size:bytesperrow:bytesperimage:).md)
