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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:13:02+00:00 2026-06-07T20:13:02+00:00

I am having file with extension .RGB and need to display it on uiimageview.

  • 0

I am having file with extension .RGB and need to display it on uiimageview.

For this i need to convert the .RGB format to specific format like .PNG or .JPEG however unable to get it right .
I tried with following code for this.

    UIImage *image=[UIImage imageNamed:@"Attachment.RGB"];
CGImageRef imageRef=[image CGImage];
UIImage *myImage = [UIImage imageWithCGImage:imageRef];
NSData *pngData = UIImagePNGRepresentation(myImage);
UIImage* imageFinal = [UIImage imageWithData:pngData];

image_view.image=imageFinal;

There are online websites which can convert the RGB to visible image .But i didn’t found any solution for objective c .
Can any one help me on this .

Regards
Pagyyy123

  • 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-07T20:13:05+00:00Added an answer on June 7, 2026 at 8:13 pm

    You can use the readtex.c for this which is open source implementations for this.. see the sample following code snippets…

    static TK_RGBImageRec *tkRGBImageLoad(const char *fileName)
    {
       rawImageRec *raw;
       TK_RGBImageRec *final;
    
       raw = RawImageOpen(fileName);
       if (!raw) {
          fprintf(stderr, "File not found\n");
          return NULL;
       }
       final = (TK_RGBImageRec *)malloc(sizeof(TK_RGBImageRec));
       if (final == NULL) {
          fprintf(stderr, "Out of memory!\n");
          return NULL;
       }
       final->sizeX = raw->sizeX;
       final->sizeY = raw->sizeY;
       final->components = raw->sizeZ;
       RawImageGetData(raw, final);
       RawImageClose(raw);
       return final;
    }
    

    http://opensource.apple.com/source/X11server/X11server-85/mesa/Mesa-7.2/progs/util/readtex.c

    I hope the above URL will help.

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

Sidebar

Related Questions

I am having a file called demo.png which is saved in the documents/test/ folder.
I have a text file having words that i need to validate. After following
I have a .txt file having some text. I want to read this file
Having this text file : Breathing 1:-29.9396 9:-32.0895 13:-35.6787 2:-36.8527 17:-37.3622 8:-38.0584 14:-38.5265 18:-38.7567
I have a form and having two file upload elements. it is like $data_file_one
I'm having trouble associating my custom file extension to my android application that I
I am having problems downloading files possibly due to the file extensions not matching
im my web page having file upload option..it has to check two conditions. 1)whether
I am having a file of strings by which I want to create an
I am having batch file called Formalbuild.bat ,It will take parameter name called componentName.

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.