Skip to content

Instantly share code, notes, and snippets.

@nathanqueija
Created September 16, 2017 15:32
Show Gist options
  • Save nathanqueija/b96ab059841e27ca83aeec18b25de4d3 to your computer and use it in GitHub Desktop.
Save nathanqueija/b96ab059841e27ca83aeec18b25de4d3 to your computer and use it in GitHub Desktop.
public void TakePicture(){
NatCam.CapturePhoto(OnPhotoCapture);
}
void OnPhotoCapture (Texture2D photo, Orientation orientation) {
//I tried this first and got that behaviour that rotates the picure ONLY in the first photo captured
// ImageViewer.GetComponent<NatCamPreview> ().Apply (picture, orientation);
//Then I tried this that rotates my picture correctly but ONLY in the first picture i get thatbstrange stretching behaviour
Utilities.RotateImage (picture, Orientation.Rotation_90, null, null, (rotated, unused) => {
ImageViewer.GetComponent<NatCamPreview> ().Apply (rotated, Orientation.Rotation_90);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment