Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6325941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:59:20+00:00 2026-05-24T16:59:20+00:00

I am working on Camera Application user are taking a picture its fine,but i

  • 0

I am working on Camera Application user are taking a picture its fine,but i want to crop anywhere in that image and send it to server. How can I do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T16:59:20+00:00Added an answer on May 24, 2026 at 4:59 pm

    Check out this link for details:

    http://www.hive05.com/2008/11/crop-an-image-using-the-iphone-sdk/

    Basic code:

    - (UIImage*)imageByCropping:(UIImage *)imageToCrop toRect:(CGRect)rect
    {
       //create a context to do our clipping in
       UIGraphicsBeginImageContext(rect.size);
       CGContextRef currentContext = UIGraphicsGetCurrentContext();
    
       //create a rect with the size we want to crop the image to
       //the X and Y here are zero so we start at the beginning of our
       //newly created context
       CGRect clippedRect = CGRectMake(0, 0, rect.size.width, rect.size.height);
       CGContextClipToRect( currentContext, clippedRect);
    
       //create a rect equivalent to the full size of the image
       //offset the rect by the X and Y we want to start the crop
       //from in order to cut off anything before them
       CGRect drawRect = CGRectMake(rect.origin.x * -1,
                                    rect.origin.y * -1,
                                    imageToCrop.size.width,
                                    imageToCrop.size.height);
    
       //draw the image to our clipped context using our offset rect
       CGContextDrawImage(currentContext, drawRect, imageToCrop.CGImage);
    
       //pull the image from our cropped context
       UIImage *cropped = UIGraphicsGetImageFromCurrentImageContext();
    
       //pop the context to get back to the default
       UIGraphicsEndImageContext();
    
       //Note: this is autoreleased
       return cropped;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this camera application that I'm working on which uses openCV for image
I'm working on a .NET CF 2.0 application that uses the camera, showing the
I'm working on an iPhone application that involves uploading full photos from the camera
I am currently working on interior Decoration Iphone Application, That needs Camera. So when
i want that upon opening my N73's camera cover,the camera software keeps working as
I am developing a small application with Custom Camera control . Its working verry
I am working on a camera application and I have integrated it successfully but
I am working now on application that start the camera and take a photo,
I implemented the application for getting image from the camera album in sdcard.But it
I have the camera working in my app, but after the picture is captured

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.