回答編集履歴
2
追記。
test
CHANGED
@@ -11,3 +11,9 @@
|
|
11
11
|
```
|
12
12
|
|
13
13
|
|
14
|
+
|
15
|
+
【追記】
|
16
|
+
|
17
|
+
でも、無視すると逆におかしくなる画像が出てくると思います。
|
18
|
+
|
19
|
+
|
1
大幅に修正。
test
CHANGED
@@ -1,5 +1,13 @@
|
|
1
|
-
UIImage
|
1
|
+
UIImageの`imageOrientation`プロパティに従って画像が回転しますので、
|
2
2
|
|
3
|
-
それを
|
3
|
+
それを無視すれば、ご希望の向きになるかも知れません。
|
4
4
|
|
5
|
+
```swift
|
6
|
+
|
5
|
-
|
7
|
+
let imageTmp = UIImage(data: NSData(contentsOfURL: NSURL(string: urlString)!)!)
|
8
|
+
|
9
|
+
let imageData = UIImage(CGImage: imageTmp!.CGImage!, scale: imageTmp!.scale, orientation: .Up/*回転無し*/)
|
10
|
+
|
11
|
+
```
|
12
|
+
|
13
|
+
|