UIImage seems to be nil when trying to display bitmap images on iOS 15.7 and iPadOS 15.7.
This issue does not occur iOS 16 and iPadOS 16 beta.
note: some bitmap images can be displayed.
Here is the steps for reproduction.
Download any image http://ww3.tiki.ne.jp/~k_nakada/material.html
Add the image to Assets Catalog.
Initialize UIImage and set it to UIImageView as following.
The image cannot be displayed.
let imageView = UIImageView()
if let sampleData = NSDataAsset(name: "imageName")?.data {
imageView.image = UIImage(data: sampleData)
}
I would appreciate any help, thanks.