iphone Programming Glossary: scaleandrotateimage
iOS: Image get rotated 90 degree after saved as PNG representation data http://stackoverflow.com/questions/10850184/ios-image-get-rotated-90-degree-after-saved-as-png-representation-data UIImage imageWithContentsOfFile delegate filePath imageName NSLog @ Scaling photo delegate.scaledAndRotatedPhoto self scaleAndRotateImage UIImage imageWithContentsOfFile delegate filePath imageName picker dismissModalViewControllerAnimated YES picker release.. delegate.originalPhoto imageData writeToFile delegate filePath imageName atomically YES Here fixOrientation and scaleAndRotateImage functions taken from here and here respectively. They works fine and rotate image when I apply them on UIImage but doesn't..
MFMailComposeViewController image orientation http://stackoverflow.com/questions/20204495/mfmailcomposeviewcontroller-image-orientation scale gImag.scale orientation gImag.imageOrientation ...do physical rotation if needed PIMG ImgOut gU scaleAndRotateImage tmpImag ...note orientation is UIImageOrientationUp now NSData imageAsNSData UIImageJPEGRepresentation ImgOut 0.9f mailVC.. current state. And finally here's the code I grabbed from here that does the physical rotation if necessary UIImage scaleAndRotateImage UIImage imageIn ...thx http blog.logichigh.com 2008 06 05 uiimage fix int kMaxResolution 3264 Or whatever CGImageRef imgRef..
iPhone: AVCaptureSession capture output crashing (AVCaptureVideoDataOutput) http://stackoverflow.com/questions/3331644/iphone-avcapturesession-capture-output-crashing-avcapturevideodataoutput imageBuffer 0 Adding code after this point to do image transformation usually causes it to crash UIImage rot self scaleAndRotateImage sourceImage self.detectImage rot Code to transform the image.... UIImage scaleAndRotateImage UIImage image int kMaxResolution.. to crash UIImage rot self scaleAndRotateImage sourceImage self.detectImage rot Code to transform the image.... UIImage scaleAndRotateImage UIImage image int kMaxResolution 320 Or whatever CGImageRef imgRef image.CGImage CGFloat width CGImageGetWidth imgRef CGFloat..
UIImagePickerController camera preview is portrait in landscape app http://stackoverflow.com/questions/538041/uiimagepickercontroller-camera-preview-is-portrait-in-landscape-app your taken image into a method like this Code from http discussions.apple.com thread.jspa messageID 7949889 UIImage scaleAndRotateImage UIImage image int kMaxResolution 640 Or whatever CGImageRef imgRef image.CGImage CGFloat width CGImageGetWidth imgRef CGFloat..
iphone:Image captured from camera rotate -90 degree automatically http://stackoverflow.com/questions/9324130/iphoneimage-captured-from-camera-rotate-90-degree-automatically UIImagePickerController picker didFinishPickingImage UIImage image editingInfo NSDictionary editingInfo image self scaleAndRotateImage image self useImage image picker parentViewController dismissModalViewControllerAnimated YES void scaleAndRotateImage UIImage.. scaleAndRotateImage image self useImage image picker parentViewController dismissModalViewControllerAnimated YES void scaleAndRotateImage UIImage image int kMaxResolution 320 Or whatever CGImageRef imgRef image.CGImage CGFloat width CGImageGetWidth imgRef CGFloat..
|