Hi!
I want to try to mirror an image, but it didn’t work. I used the command
glReadPixels to import the picture in the buffer and now I have to mirror
it.
I tried this with the command glScalef(1,-1,1); but it didn’t work. I have
to refer to the image buffer, right? But how does it work?
Code:
JSAMPLE * image_buffer=new JSAMPLE[5825003];
glPixelStorei(GL_PACK_ALIGNMENT,1);
glReadPixels(0,0,582,500,GL_RGB,GL_UNSIGNED_BYTE,image_buffer);
glScalef(1,-1,1);
write_JPEG_file (“test.jpg”,100,image_buffer,582,500);
delete image_buffer;
Thanks and a happy new year!