开发者

Inverted images in the simulator

I have a bit of simple code, that pulls images from the documents directory.. and loads it into an imageView.

- (void)viewDidLoad
{
    [super viewDidLoad];

    NSString* pathToFile = [NSString stringWithFormat:@"%@/images/%@",[self documentsDirectory],@"copy.jpg"];

    UIImageView *tmp = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:pathToFile]];

    [self.view addSubvie开发者_JAVA技巧w:tmp];
}



- (NSString *)documentsDirectory
{
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    return [paths objectAtIndex:0];
}

My image, when viewed shows up correct, but when it's loaded into the app and viewed on the simulator.. it's inverted.

Example: https://skitch.com/critz/fnh8p/colorsnapper

any ideas, suggestions.. would be /greatly/ appreciated..


Interesting... Same code base run in >4.2 and the images are inverted. If I run it in the 5bx simulator.. they come out as they should.. SMH. Oh well..

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜