UIImage(named:) with MTKTextureLoader throws error "Image decoding failed"
|Product:||iOS + SDK
The image that I tested with is a PNG with RGB + alpha channels which was stored in Assets.xcassets. The asset image is universal with 1x, 2x, 3x versions. It was retrieved using UIImage(named:).
Steps to Reproduce:
1. Set up a MTKTextureLoader
2. Get a PNG with alpha from assets using UIImage(named:)
3. Get the CGImage from the image
4. Attempt to load it using loader.newTexture(with:options:)
5. Get error "Image decoding failed"
An MTLTexture object.
Error "Image decoding failed"
iPhone 6s (MKRY2LL/A)
Reports posted here will not necessarily be seen by Apple.
All problems should be submitted at bugreport.apple.com before they are posted here.
Please only post information for Radars that you have filed yourself, and please do
not include Apple confidential information in your posts. Thank you!