在我的應用程序一個UIImage的大小是(320460)關於產品旋轉的UIImage
我創建使用
- (id)initWithCGImage:(CGImageRef)imageRef scale:(CGFloat)scale orientation:(UIImageOrientation)orientation
我分配取向UIImageOrientationLeft另一個UIImage對象。
然後我打印新的UIImage對象的大小,結果是(460,320)。
它已經旋轉到左側了。
我需要將UIImage存儲在我的文檔目錄中。
NSData *imageData = UIImagePNGRepresentation(rotateImageView);
NSString * path = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
[imageData writeToFile:[path stringByAppendingPathComponent:@"test.png"] atomically:NO];
但是,當我從「test.png」
得到了UIImage對象它的大小變更爲(320460),它旋轉到其一部開拓創新的地位。
我想它可以存儲在(460320)
我做出的一些錯誤?
謝謝!