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

  • Home
  • SEARCH
  • 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 6007437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:40:51+00:00 2026-05-23T01:40:51+00:00

A function that I am trying to conform to requires three 1-Dimensional arrays of

  • 0

A function that I am trying to conform to requires three 1-Dimensional arrays of type double[19200]. The following arrays are RGB arrays such that:

double r[19200]; // r
double g[19200]; // g
double b[19200]; // b

So far, I can extract pixel information from a QImage and populate the above arrays.

The problem is with testing. I don’t know how to do the inverse: given the three 1-Dimensional arrays how do I create a new QImage from this data?

I would like to verify that I am indeed getting the correct values. (Things like column vs. row major order is giving me doubts). As a result, I am trying to construct an image a QImage from these three 1-D Dimensional arrays.

  • 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-23T01:40:52+00:00Added an answer on May 23, 2026 at 1:40 am

    I don’t really understand why you’re having a problem if you managed to do it one way. The process is essentially the same:

    for (int x=0; x<w; x++)
      for (int y=0; y<h; y++)
         image.setPixel(x,y, convertToRGB(r[x*w+y], ...);
    

    Where convertToRGB is the inverse transform of what you to to convert and RGB value to your float values, supposing the image has dimension w*h. If you discover this is the wrong row-major/column major variant, just inverse it.

    Since you gave no info about how you do the color space conversion, and we don’t know if it’s row-major or column-major either, can’t help you much more than that.

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

Sidebar

Related Questions

I'm trying to write a regex function that will identify and replace a single
I'm trying to write a function that formats every (string) member/variable in an object,
I am trying to write a function that will pull the name of a
I am trying to write a JavaScript function that will return its first argument(function)
I'm trying to write a function that is able to determine whether a string
I'm trying to write a custom function that will let me retrieve a cell
I'm trying to write a javascript function that adds some DOM nodes to the
I'm trying to create a function that searches up a WebControl's parent-child relationship (basically
I'm trying to find/write a function that would perform the same operation as imlincomb
I'm trying to define a delegate function that will return an IEnumerable. I'm having

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.