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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:17:55+00:00 2026-06-11T07:17:55+00:00

My problem is same as Converting byte array coming from Web service to UIImage

  • 0

My problem is same as Converting byte array coming from Web service to UIImage iPhone
.Now I am storing these bytes in NSMutableArray.But the method:

NSData *data = [NSData dataWithBytes:YOUR_BYTE_ARRAY length:ARRAY_LENGTH];

takes arrayOfBytes as parameter.So can anyone tell me that how to convert this array in byte array. I searched a lot but unable to find relevant contents.

  • 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-11T07:17:56+00:00Added an answer on June 11, 2026 at 7:17 am

    Thanks for your co-operation. But it does not help me. After a long research i found my solution. I am sharing my information so that others can get right answer.

            NSArray *byteArray = [[NSArray alloc]init]; //strore all data here coming from server in byte formate
    
            unsigned c = [byteArray count];
            uint8_t *bytes = malloc(sizeof(*bytes) * c);
    
            unsigned i;
            for (i = 0; i < c; i++)
            {
                NSString *str = [byteArray objectAtIndex:i];
                int byte = [str intValue];
                bytes[i] = (uint8_t)byte;
            }
    
            NSData *data = [[NSData alloc]initWithBytes:bytes length:c];
            UIImage *image = [UIImage imageWithData:data];
            NSLog(@"image %@",image);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having the same problem issued in these two links: one , two .
I have problem converting .NET C# AES 128 Encryption to iOS (iPhone). Everything generated
I have a problem with converting raw-bytes values into java types. I am receiving
Problem I have a timestamp that I am converting to an NSDate . Now
This problem is same as asked in here . Given a list of coins,
I have the same problem that is listed in the following thread. WSDL first
I have the same problem as described in ( Last record of Join table
I have the same problem as in the following post . So I am
I have the same problem described here on the e-office blog , but in
I'm having the same problem as this question . I tried installing the libcairo

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.