public void SaveImageToPhotoLibrary()
        {
#if !DISABLE_IMAGE_PICKERS
            IGImagePicker.SaveImageToGallery(testImage);
#else
            ExampleUtil.LogFeatureDisabled();
#endif
        }
예제 #2
0
 public static void SavePhoto(Texture2D texture)
 {
 #if UNITY_IOS
     IGImagePicker.SaveImageToGallery(texture);
 #elif UNITY_ANDROID
     string       imageTitle = "mcm house ar " + System.DateTime.Now.ToString("yy-MM-dd-hh-mm-ss");
     const string folderName = "mcm house ar screenshots";
     AGGallery.SaveImageToGallery(texture, imageTitle, folderName, ImageFormat.JPEG);
 #endif
 }
예제 #3
0
        public void PickImageFromPhotosAlbum()
        {
            const bool  allowEditing       = true;
            const float compressionQuality = 0.1f;
            var         screenPosition     = new Vector2(Screen.width / 2, Screen.height / 2);

            IGImagePicker.PickImageFromPhotosAlbum(tex =>
            {
                Debug.Log("Successfully picked image from photos album");
                image.sprite = SpriteFromTex2D(tex);
                // IMPORTANT! Call this method to clean memory if you are picking and discarding images
                Resources.UnloadUnusedAssets();
            },
                                                   () => Debug.Log("Picking image from photos album cancelled"),
                                                   compressionQuality,
                                                   allowEditing, screenPosition);
        }
예제 #4
0
        public void PickImageFromPhotoLibrary()
        {
            const bool  allowEditing       = false;
            const float compressionQuality = 0.5f;
            var         screenPosition     = new Vector2(Screen.width, Screen.height); // On iPads ONLY you can choose screen position of popover

            IGImagePicker.PickImageFromPhotoLibrary(tex =>
            {
                Debug.Log("Successfully picked image from photo library");
                image.sprite = SpriteFromTex2D(tex);
                // IMPORTANT! Call this method to clean memory if you are picking and discarding images
                Resources.UnloadUnusedAssets();
            },
                                                    () => Debug.Log("Picking image from photo library cancelled"),
                                                    compressionQuality,
                                                    allowEditing, screenPosition);
        }
예제 #5
0
        public void PickImageFromCamera()
        {
            const bool  allowEditing       = true;
            const float compressionQuality = 0.8f;
            const IGImagePicker.CameraType      cameraType = IGImagePicker.CameraType.Front;
            const IGImagePicker.CameraFlashMode flashMode  = IGImagePicker.CameraFlashMode.On;

            IGImagePicker.PickImageFromCamera(tex =>
            {
                Debug.Log("Successfully picked image from camera");
                image.sprite = SpriteFromTex2D(tex);
                // IMPORTANT! Call this method to clean memory if you are picking and discarding images
                Resources.UnloadUnusedAssets();
            },
                                              () => Debug.Log("Picking image from camera cancelled"),
                                              compressionQuality,
                                              allowEditing, cameraType, flashMode);
        }
        public void PickVideoFromPhotosAlbum()
        {
#if !DISABLE_IMAGE_PICKERS
            const bool allowEditing   = false;
            var        screenPosition = new Vector2(Screen.width / 2, Screen.height / 2);

            IGImagePicker.PickVideoFromPhotoLibrary(path =>
            {
                _lastPickedVideoPath = path;
                Debug.Log("Successfully picked video from photos album: " + path);
                EditVid(path);
            },
                                                    () => Debug.Log("Picking video from photos album cancelled"),
                                                    allowEditing, screenPosition);
#else
            ExampleUtil.LogFeatureDisabled();
#endif
        }
예제 #7
0
 public void SaveImageToPhotoLibrary()
 {
     IGImagePicker.SaveImageToGallery(testImage);
 }