<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/TextureResource/Contents/MipmapLevel/mip(data:bytesPerRow:bytesPerImage:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation15TextureResourceC8ContentsV11MipmapLevelV3mip4data11bytesPerRow0jK5ImageAG0B04DataV_S2itFZ"
  },
  "title" : "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.

```
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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)