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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:58:22+00:00 2026-05-25T21:58:22+00:00

I have an unsigned char* data with the following values, as seen while debugging

  • 0

I have an unsigned char* data with the following values, as seen while debugging in xcode,

\xc1\xc1\xc1\xc1\xc1\xc1\xc1\xc0\x84\x03\x03\x02\x03\x02\x03\x03\x03\x02\x02\x03\x02\x03\x02\x02\x03\x02\x02\x02\x02\x03\x03\x03\x03\x03\x02\x02\x03\x03\x03\x02\x02\x03\x02\x02\x02\x02\x03\x03\x03\x02\x02\x02\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x02\x02\x03\x03\x03\x03\x03\x02\x03\x02\x03\x02\x03\x03\x02\x02\x03\x03\x03\x02\x02\x02\x02\x02\x03\x02\x02\x03\x02\x03\x02\x02\x03\x03\x03

This is the data array for a qr code.

Symbol data is represented as an array contains width*width uchars. Each uchar represents a module (dot). If the less significant bit of the uchar is 1, the corresponding module is black.

In the above case the width is 177.

I have tried various combination in CGBitmapContextCreate, but always seem to get NULL.

Please advise.

Your help will be much appreciated.

  • 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-25T21:58:23+00:00Added an answer on May 25, 2026 at 9:58 pm

    I have successfully used :

    CGImageRef refImage = [myUIImage CGImage];
    CGContextRef ctx;
    int w = CGImageGetWidth(refImage);
    int h = CGImageGetHeight(refImage);
    int bytesPerRow = CGImageGetBytesPerRow(refImage);
    ctx = CGBitmapContextCreate(rawData,
                                w,
                                h,
                                8,
                                bytesPerRow,
                                CGImageGetColorSpace( refImage ),
                                kCGImageAlphaPremultipliedLast ); 
    
    // Fill in rawData, which is the unsigned char pixel array
    
    refImage = CGBitmapContextCreateImage (ctx);
    UIImage* myUIImage2 = [UIImage imageWithCGImage:refImage];  
    
    CGContextRelease(ctx); 
    CGImageRelease(refImage);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code: tmp_data = simulated_data[index_data]; unsigned char *dem_content_buff; dem_content_buff = new
I have the following code int ParseData(unsigned char *packet, int len) { struct ethhdr
I have the following code in my file: unsigned char * pData = new
I have this array: unsigned char* data = CGBitmapContextGetData(cgctx); then I tried to get
So, I have two types at the moment: const unsigned char* unencrypted_data_char; string unencrypted_data;
I have unsigned char* , want to convert it to std::string . Can you
I have a incoming stream of bytes (unsigned char) from either a file or
I have a small sample function: #define VALUE 0 int test(unsigned char x) {
I have an unsigned int variable and it can only have the values of
Suppose I have an array unsigned char arr[]= {0,1,2,3,4,5,6,7,8,9}; Is there a way to

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.