Images are Upside down and Mirrored

For some reason, images are top down and mirrored.
I don’t think this the way it is supposed to be?

  
  
...  
  for (int i = 0; i < numberOfPages; i++)  
    {  
      pages[i].loadImage("Pages/"+ofToString(i)+".png");  
    }  
...  
  
void Book::draw()  
{  
  int width = ofGetWidth()/2;  
  int height = ofGetHeight();  
  //TODO Höhe an Aspect Ratio anpassen.  
  pages[currentPageNumber].draw(0,0, width,height);  
  pages[currentPageNumber+1].draw(width,0, width, height);  
}  
  

I can’t see what I’m missing.

Ubuntu 9.04 64 that is.

I know, it is fairly easy to rotate images, just reporting for now.

can you post the full src and data of an app that does this?

does the image loader example look backwards (there are some images with words there).

thanks!
zach

Hey Zach,

the imageloaderExample has exactly the same problem.

Maybe there is just something wrong with intels integrated graphics driver?
Does _anyone_ else has this problem too?

Richard

The imageloaderExample works fine on my MacBook Pro.

hi

that’s really weird, i’ve worked with some intel integrated some time ago and didn’t have that problem. it was 32 bits though. but i work usually with 64 bits and haven’t seen something like that.

i suppose it has something to do with loading images more than with the textures, but to be sure can you test this:

  
  
ofTexture tex;  
unsigned char* pixels;  
  
void testApp::setup(){  
    tex.allocate(640,480,GL_RGB);  
    pixels = new unsigned char[640*480*3];  
   for(int i=0; i<480; i++){  
       int value = 255.0*(float)i/480.0;  
       memset(pixels+i*640*3,value,640*3);  
   }  
   tex.loadData(pixels,640,480,GL_RGB);  
}  
void testApp::draw(){  
   tex.draw(20,20);  
}  
  

the result should be a 640*480 rectangle with a gradient from black to white, do you see it rotated too?

Gradient seems to be fine.

I’m sorry to say, but I’ll be gone in the offline world until monday.
So don’t wonder too much if there are no answers from my side.