Search Results

Search found 6 results on 1 pages for 'sujyanarayan'.

Page 1/1 | 1 

  • To store images from UIGetScreenImage() in NSMutable Array

    - by sujyanarayan
    Hi, I'm getting images from UIGetScreenImage() and storing directly in mutable array like:- image = [UIImage imageWithScreenContents]; [array addObject:image]; [image release]; I've set this code in timer so I cant use UIImagePNGRepresentation() to store as NSData as it reduces the performance. I want to use this array directly after sometime i.e after capturing 1000 images in 100 seconds. When I use the code below:- UIImage *im = [[UIImage alloc] init]; im = [array objectAtIndex:i]; UIImageWriteToSavedPhotosAlbum(im, nil, nil, nil); the application crashes. And I dont want to use UIImagePNG or JPGRepresentation() in timer as it reduces performance. My problem is how to use this array so that it is converted into image. If anybody has idea related to it please share with me. Thanks in Advance.

    Read the article

  • NSMutableArray EXC_BAD_EXCESS SIGBUS

    - by sujyanarayan
    Hi, I've the following code which causes crashes after sometime as i've set the below code in a timer:- CGImageRef cgImage = UIGetScreenImage(); [array addObject:(id)cgImage]; CGImageRelease(cgImage); Where initiallly i've declared "array" as: array = [[NSMutableArray alloc] init]; The timer goes well till 10 seconds as timer is of 1/10 seconds after 10 seconds it crashes. I think the application crashes because of EXC_BAD_EXCESS but dont know how to solve. Can Anybody help in solving the problem? Thanks in Adv.

    Read the article

  • PLCameraController is not adding in viewcontroller

    - by sujyanarayan
    Hi, I've declared PLCameraContoller instance in my AppDelegate class as:- self.cameraController = [PLCameraController performSelector:@selector(sharedInstance)];[cameraController setDelegate:self]; And I'm accessing it in one of my viewcontroller class as:- del = [[UIApplication sharedApplication] delegate]; UIView previewView = [del.cameraController performSelector:@selector(previewView)]; previewView.frame = CGRectMake(0,0, 320, 480); self.view = previewView; [del.cameraController performSelector:@selector(startPreview)]; [del.cameraController performSelector:@selector(setCameraMode:) withObject:(NSNumber)1]; Where "del" is an instance of my AppDelegate class. But i can see only black background in my viewcontroller view in iphone device. Also if i remove "self" from the appdelegate.m code of cameracontroller it also showing blank. How can i get camera in my view controller? I'm pretty much struggling with it. Thanks in Adv.

    Read the article

  • Application crashes after when array of images are stored

    - by sujyanarayan
    Hi, I'm getting the screenshots from the following code:- CGImageRef cgScreen = UIGetScreenImage(); if (cgScreen) { UIImage *result = [UIImage imageWithCGImage:cgScreen]; CGImageRelease(cgScreen); return result; } I'm calling the above code in a timer of 1/1.0 seconds as:- [array addObject:[UIImage imageWithScreenContents]]; where imagewithScreenContents is a function. But after some seconds i.e after adding 90 frames application crashes. I'm unable to understand the problem. Can somebody help me in solving the problem. Thanks in Adv.

    Read the article

  • presentmodalviewcontroller not working properly in Application Delegate in iPhone

    - by sujyanarayan
    Hi, I'm using two UIViewController in Application Delegate and navigating to UIViewController using presentmodalviewcontroller. But Problem is that presentmodalviewcontroller works for first time UIViewController and when i want to navigate to second UIViewController using presentmodalviewcontroller then its showing first UIViewController. The following is the code:- -(void)removeTabBar:(NSString *)str { HelpViewController *hvc =[[HelpViewController alloc] initWithNibName:@"HelpViewController" bundle:[NSBundle mainBundle]]; VideoPlaylistViewController *vpvc =[[VideoPlaylistViewController alloc] initWithNibName:@"VideoPlaylistViewController" bundle:[NSBundle mainBundle]]; if ([str isEqualToString:@"Help"]) { [tabBarController.view removeFromSuperview]; [vpvc dismissModalViewControllerAnimated:YES]; [viewController presentModalViewController:hvc animated:YES]; [hvc release]; } if ([str isEqualToString:@"VideoPlaylist"]) { [hvc dismissModalViewControllerAnimated:YES]; [viewController presentModalViewController:vpvc animated:YES]; [vpvc release]; } } Can Somebody help me in solving the problem?

    Read the article

1