开发者

iOS 4.3 and CMYK JPG images

I updated my iPad yesterday from iOS 4.2.1 to iOS 4.3. An application I am working on uses a bunch of JPG im开发者_开发技巧ages that were exported from Photoshop as CMYK JPG images. In 4.2.1, the images displayed correctly, but in 4.3, they are displayed incorrectly, mostly black.

Are CMYK images not supported? Is this is bug with iOS 4.3? If it matters, I've tried both setting the images directly in Interface Builder as well as setting it via code using UIImage imageNamed: and UIImageView setImage: methods. Thanks.


In iOS 4.3 your CMYK jpeg image will be mostly black if you load it directly with [UIImage imageNamed:] I solved it in my app simply by converting the image downloaded to JPEG before loading it into the image property:

self.imageView.image = [UIImage imageWithData:UIImageJPEGRepresentation([UIImage imageWithContentsOfFile:imageFilePath], 1.0)];

Hope this helps!


If Apple didn't specifically say they were dropping support for this format in any of their iOS developer documentation, then file a bug report with Apple. They rarely drop support for image, movie, audio, etc... formats.


If someone falls here by Google, just had the same problem.

In iOS 5 everything works great, but in 4.3.x the image is mostly black, just some shadows appear.

ATM, the solution was change the image color palette.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜