<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 7.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/vImageRotate90_ARGB16U(_:_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@vImageRotate90_ARGB16U"
  },
  "title" : "vImageRotate90_ARGB16U(_:_:_:_:_:)"
}
-->

# vImageRotate90_ARGB16U(_:_:_:_:_:)

Rotates an unsigned 16-bit-per-channel, 4-channel interleaved image by a multiple of 90°.

```
func vImageRotate90_ARGB16U(_ src: UnsafePointer<vImage_Buffer>, _ dest: UnsafePointer<vImage_Buffer>, _ rotationConstant: UInt8, _ backColor: UnsafePointer<UInt16>, _ flags: vImage_Flags) -> vImage_Error
```

## Parameters

`src`

A pointer to a vImage buffer structure that contains the source image.

`dest`

A pointer to the destination vImage buffer structure. You’re responsible for filling out the `height`, `width`, and `rowBytes` fields of this structure and for allocating a data buffer of the appropriate size. On return, the data buffer this structure points to contains the destination image data. When you no longer need the data buffer, deallocate the memory to prevent memory leaks.

`rotationConstant`

A constant that specifies the rotation angle as a multiple of 90°. See <doc://com.apple.documentation/documentation/Accelerate/1509228-rotation-constants> for the full list of supported rotation constants.

`backColor`

A background color. If you set the `kvImageBackgroundColorFill` flag, pass a pixel value.

`flags`

The options to use when performing the operation. If your code implements its own tiling or its own multithreading, pass [`kvImageDoNotTile`](/documentation/Accelerate/kvImageDoNotTile); otherwise, pass [`kvImageNoFlags`](/documentation/Accelerate/kvImageNoFlags).

## Return Value

[`kvImageNoError`](/documentation/Accelerate/kvImageNoError); otherwise, one of the error codes from <doc://com.apple.documentation/documentation/Accelerate/1578972-error-codes>.

## Discussion

This function maps the center point of the source image to the center point of the destination image. It doesn’t scale or resample; instead, the function copies unchanged individual pixels to new locations.

Depending on the relative sizes of the source image and the destination buffer, the function may clip parts of the source image. Areas outside the source image might appear in the destination image if you don’t pass a background color to the function.

The 90° and 270° rotations don’t rotate around the true center of the image if either of the following is true:

- The parities of the source height and the destination width don’t match. For example, the source height is odd and the destination width is even.
- The parities of the source width and the destination height don’t match. For example, the source width is odd and the destination height is even.

The 0° and 180° rotations don’t rotate around the true center of the image if either of the following is true:

- The parities of the source height and the destination height don’t match. For example, the source height is odd and the destination height is even.
- The parities of the source width and the destination width don’t match. For example, the source width is odd and the destination width is even.

To overcome this limitation, use the high-level rotation functions — for example, [`vImageRotate90_ARGB16U(_:_:_:_:_:)`](/documentation/Accelerate/vImageRotate90_ARGB16U(_:_:_:_:_:)).

## See Also

  <doc://com.apple.accelerate/documentation/Accelerate/applying-geometric-transforms-to-images>



---

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)