Image File to String

Discussion in 'iOS Programming' started by HarryWorksInc, Feb 21, 2010.

  1. HarryWorksInc macrumors regular

    Joined:
    Feb 21, 2010
    #1
    Hey I have an application i'm working on in which I take a picture of the screen:
    HTML:
    	CGRect screenRect = [[UIScreen mainScreen] bounds];
    	UIGraphicsBeginImageContext(screenRect.size);
    	
    	CGContextRef ctx = UIGraphicsGetCurrentContext();
    	[[UIColor blackColor] set];
    	CGContextFillRect(ctx, screenRect);
    	
    	[self.view.layer renderInContext:ctx];
    	
    	UIImage *image1 = UIGraphicsGetImageFromCurrentImageContext();
    	Image2Share = image1;
    	
    	UIGraphicsEndImageContext();
    	[self Sendmessage];
    and then I attach the photo to an email, but I need to get the string name of the image. Does anybody know how I would do that? Or if thats possible.
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    Images don't have names. Just make something up, like "Screenshot 1".
     
  3. HarryWorksInc thread starter macrumors regular

    Joined:
    Feb 21, 2010
    #3
    oh

    Oh ok, so you mean name the screenshot "Screenshot 1"
     
  4. HarryWorksInc thread starter macrumors regular

    Joined:
    Feb 21, 2010
    #4
    Do you know how?

    Do you know how I would do that, sorry i'm not so hot with UIImages I haven't played with them to much. This is my first app dealing with editing images.
     

Share This Page