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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:52:44+00:00 2026-05-27T05:52:44+00:00

My assignment is to get images read into pixmaps which you will then convert

  • 0

My assignment is to get “images read into pixmaps which you will then convert to texture maps”. So for the pixmap part only, hear me out and tell me if I have the right idea and if there’s an easier way. Library docs I’m using: http://www.imagemagick.org/Magick++/Documentation.html

Read in image:

Image myimage;
myimage.read( "myimage.gif" );

I think this is the pixmap I need to read ‘image’ into:

GLubyte pixmap[TextureSize][TextureSize][3];

So I think I need a loop that, for every ‘pixmap’ pixel index, assigns R,G,B values from the corresponding ‘image’ pixel indices. I’m thinking the loop body is like this:

pixmap[i][j][0] = myimage.pixelColor(i,j).redQuantum(void);
pixmap[i][j][1] = myimage.pixelColor(i,j).greenQuantum(void);
pixmap[i][j][2] = myimage.pixelColor(i,j).blueQuantum(void);

But I think the above functions return Quantums where I need GLubytes, so can anyone offer help here?

— OR —

Perhaps I can take care of both the pixmap and texture map by using OpenIL (docs here: http://openil.sourceforge.net/tuts/tut_10/index.htm). Think I could simply call these in sequence?

ilutOglLoadImage(char *FileName);
ilutOglBindTexImage(ILvoid);
  • 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-27T05:52:44+00:00Added an answer on May 27, 2026 at 5:52 am

    You can copy the quantum values returned by pixelColor(x,y) to ColorRGB and you will get normalized (0.0,1.0) color values.

    If you don’t have to stick with Magick++ maybe you can try OpenIL, which can load and convert your image to OpenGL texture maps without too much hassle.

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

Sidebar

Related Questions

Im having a problem with a final part of my assignment. We get in
I have this assignment to read, write, enable cookies so that the username will
I don't know if the term mass assignment is Rails-specific but I get the
The assignment at my first year uni computing course says my program should read
For a database assignment I have to model a system for a school. Part
I'm trying to get images to display in a WPF ListView styled like a
I'm doing a homework assignment in which I need to print out to the
I am working with a 2-dimensional array of structs which is a part of
C# .Net 3.5 I get a list of images, make a copy, provide an
For a University assignment I'm building a class structure that includes, in part, several

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.