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(); }
private void OpenImagePicker() { _imagePicker.OpenGallery(); }