示例#1
0
    public void OpenGallery()
    {
        Debug.Log("Kauel: OpenGallery External");

        ImagePicker.OpenGallery((Texture2D tex, ExifOrientation orientation) => {
            Debug.Log("Kauel: OpenGallery Internal");

            if (tex != null)

            {
                Alert.Singleton.ShowAlert(Alert.Message.LOADING, false, delegate() {
                    Debug.Log("Kauel: w:" + tex.width + "h:" + tex.height);

                    int w = tex.width;

                    int h = tex.height;

                    if (w > h)
                    {
                        w = 1024;

                        h = tex.height * w / tex.width;
                    }
                    else
                    {
                        h = 1024;

                        w = tex.width * h / tex.height;
                    }

                    Texture2D resizedTex = tex.NewResizedTexture(w, h);

                    //   Destroy(tex); //Esta linea está a prueba.

                    RawImageEdit.texture = resizedTex;

                    Alert.Singleton.CloseAlert(true);

                    TheKamera.StartFile(resizedTex);

                    kuiPanelManager.ShowOnlyThisPanel(3);
                });
            }
        }, true, ImagePickerType.UIImagePickerControllerSourceTypePhotoLibrary);
    }
 private void ChangePhoto()
 {
     _imagePicker.OpenGallery();
 }
示例#3
0
 private void OpenImagePicker()
 {
     _imagePicker.OpenGallery();
 }