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 7432287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:26:05+00:00 2026-05-29T09:26:05+00:00

My question is related to this link I would like to know how we

  • 0

My question is related to this link

I would like to know how we can save images larger than device resolution using CGBitmapContextCreate .

Any sample code for guidance will be much appreciated.

thanks!

  • 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-29T09:26:05+00:00Added an answer on May 29, 2026 at 9:26 am

    Don’t use CGBitmapContextCreate, use UIGraphicsBeginImageContextWithOptions, it’s much easier. Use it like this:

    UIGraphicsBeginImageContextWithOptions(CGSizeMake(width, height), YES, 1.0f);
    CGContextRef context = UIGraphicsGetCurrentContext();
    
    //do your drawing
    
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEdnImageContext();
    
    //your resultant UIImage is now stored in image variable
    

    The three parameters to UIGraphicsBeginImageContext are:

    1. The size of the image – this can be anything you want

    2. Whether the image has transparency or not

    3. The scale of pixels in the image. 0.0 is the default, so on an iPhone 3GS it will be 1.0 and on an iPhone 4 with a retina display it will be 2.0. You can pass in any scale you want though, so if you pass in 5.0, each pixel unit in your image will actually be 5×5 pixels in the bitmap, just like 1 pixel on a Retina display is really 2×2 pixels on screen.

    Edit: it turns out that the question of whether UIGraphicsBeginImageContext() is thread-safe seems to be a bit controversial. If you do need to do this concurrently on a background thread, there is an alternative (rather more complex approach) using CGBitMapContextCreate() here: UIGraphicsBeginImageContext vs CGBitmapContextCreate

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question is related to this SO post Rather than using a recursive CTE
This question is related to this , hopefully better phrased. I would like to
My question is related to this link stackoverflow ques In essence repeating the figure
I found this related question: How do I use composition with inheritance? I would
I asked a question related to this one previously but I need to know
Another question related to this one . I have a List<SortableObjects> that is the
I have a question related to this one . I don't want to do
I have a question related to this one : I'm trying to attach an
Please note this question related to performance only. Lets skip design guidelines, philosophy, compatibility,
My question is related to this question: Baseline snaplines in custom Winforms controls However,

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.