- 別のアセットでAndroid Galleryの画像パスまでは取れる状態になっていた
- 後はパスから画像を呼んでExifを引き出せればいい
- こちらのAssetを使った。最初からGalleryにはこれを使っても良さそう。無料
- orientationを取って使っている部分のコードは下記
foreach (var an_media in result.Media) { Debug.Log("an_media.Type: " + an_media.Type); Debug.Log("an_media.Path: " + an_media.Path); Debug.Log("an_media.Thumbnail: " + an_media.Thumbnail); var info = NativeGallery.GetImageProperties(an_media.Path); Debug.Log("Exif info"); Debug.Log(info.orientation); lastLoadedOrientation = info.orientation; }
if(lastLoadedOrientation == NativeGallery.ImageOrientation.Rotate270) { image = RotateTexture(image, false); }
English ver
- You should use the asset!
Unityの教科書 Unity 2018完全対応版 2D&3Dスマートフォンゲーム入門講座 (Entertainment&IDEA)
- 作者: 北村愛実
- 出版社/メーカー: SBクリエイティブ
- 発売日: 2018/06/21
- メディア: 単行本
- この商品を含むブログ (1件) を見る