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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:38:59+00:00 2026-06-04T11:38:59+00:00

I may not always understand every function in an API but usually I can

  • 0

I may not always understand every function in an API but usually I can at least get started on a problem. This time I don’t even know if this is possible or how to attack it….

I have an area on the screen that a user can draw. This works fine. They draw with three different colors indicating three different cases. I need to detect the percent coverage of the three different colors in the area. There does not seem to be any way to get the color value of a single screen pixel. How would you approach 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-06-04T11:39:01+00:00Added an answer on June 4, 2026 at 11:39 am

    You can do this by creating a bitmap graphics context with a block of memory that you allocate and pass to CGBitmapContextCreate.

    Then you can simply draw your view or image into that context (e.g. using the CALayer method renderInContext:). The block of memory that you allocated will then contain the pixel data of what you have drawn into the context. The byte order depends on the options you specified when creating the context, usually it’ll be RGBA (one byte for red, the next for green, etc.).

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

Sidebar

Related Questions

This may not be a programming question, but I don't know where to ask
This may not be the kind of question one should ask on StackOverflow, but
This may not be possible for the carousel but is there a way to
This may be a stupid question but I can't seem to figure this out.
This could be a composite question, as I may not fully understand the issue.
This may be an older query but I could not find any satisfactory answer
I understand when an activity closes, onDestroy() is called. But this is not done
I may not understand what the return statement does(I thought it just returned a
This question may not directly relate to programming. I have noticed that the technology
I know compiler may or may not perform inline expansion of a function whether

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.