Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 6 (beta 3): Unsupported pixel format in CSI or Unable to create unsliced image from csi bitmap data

Tags:

When loading UIImages with png images in Xcode 6 beta 3 in Swift as follows:

    PipsImg = (UIImage(named: "Die-1")) 

or

    PipsImg = [(UIImage(named: "Die-1")),(UIImage(named: "Die-2"))] 

from associated images stored in the Images.xcassets folder, I receive the following fatal runtime errors:

 SimpleAnimation[680:60b] Unsupported pixel format in CSI  SimpleAnimation[680:60b] Unable to create unsliced image from csi bitmap data. 

this appears to be resolved in beta 4, however will leave in place for a bit as sometimes these regress

like image 379
dave_the_dev Avatar asked Jul 09 '14 01:07

dave_the_dev


1 Answers

This is caused by a bug in Xcode 6 (beta 3 at this time). It appears to occur only if your build target is iOS 7.x

To work around this issue:

1) delete the files from the Images.xcassets container.

2) place the images directly into the "Supporting Files" folder.

Note: It is not required to add the ".png" extension within your code, making this a clean workaround.

Please create a RADAR (bug report) to Apple.

like image 59
dave_the_dev Avatar answered Sep 20 '22 15:09

dave_the_dev