79319742

Date: 2024-12-31 10:40:41
Score: 0.5
Natty:
Report link

The problem isn't with your rotation logic - it's with the assumption that you're dealing with ARGB data.

If you're getting the buffer from the camera (which I suspect you are), it's actually in YUV format, not ARGB. That's why vImageRotate90_ARGB8888 crashes - you're telling it to rotate data in a format that doesn't match what's actually in memory.

There are two ways to fix this:

  1. If you're dealing with camera buffers (YUV format):
  1. For everything else:

The real gotcha here is that camera buffers are almost always YUV, not ARGB. Once you handle the planes correctly, the rotation works fine.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Samuel Arogbonlo