【问题标题】:Inverted images in the simulator模拟器中的倒置图像
【发布时间】:2011-09-07 23:32:11
【问题描述】:

我有一些简单的代码,它从文档目录中提取图像......并将其加载到 imageView 中。

- (void)viewDidLoad
{
    [super viewDidLoad];

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

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

    [self.view addSubview:tmp];
}



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

我的图像在查看时显示正确,但是当它加载到应用程序并在模拟器上查看时……它是倒置的。

示例:https://skitch.com/critz/fnh8p/colorsnapper

任何想法、建议..都会/非常/感激..

【问题讨论】:

  • 不确定。你尝试过其他图片吗?

标签: objective-c image-processing uiimageview uiimage ios-simulator


【解决方案1】:

有趣...相同的代码库在 >4.2 中运行并且图像被反转。如果我在 5bx 模拟器中运行它.. 他们应该会出现.. SMH。哦,好吧..

【讨论】:

    猜你喜欢
    • 2019-05-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-15
    • 2013-07-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多