ios - Implementing "Zoom" feature in AVCamViewController -



ios - Implementing "Zoom" feature in AVCamViewController -

i'm trying implement "zoom" feature in app. app supports still image, no video capturing etc.. thought should straight forwards however, i'm able zoom image when take stillimage, image comes out total image, no zoom-in/out effects. i'm using avcamviewcontroller class provided apple. appreciate if guys point i'm missing.

- (ibaction)zoomview { self.zoomscale = 1 + self.zoomslider.value; self.previewview.transform = cgaffinetransformscale(cgaffinetransformidentity,self.zoomscale, self.zoomscale); dlog(@"zoom scale:%f",self.zoomscale); }

if using apple's sample code, suggest performing zoom on on avcapturedeviceinput object opposed zooming view.

for instance, how within uigesturerecognizer (that handles pinch gestures):

dispatch_async(self.sessionqueue, ^{ avcapturedevice *device = [[self getactivevideodeviceinput] device]; nserror *error = nil; if ([device lockforconfiguration:&error]) { device.videozoomfactor = max(scale, 1.0); [device unlockforconfiguration]; } else { nslog(@"%@", error); } });

ios objective-c camera zoom

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -