In openGL ES this is trivial. Just assign different coordinates to the triangles vertices that make up your rectangle. Or swap them over in the vertex shader.
But you aren't using openGL ES directly so I don't know what you can do.
Your thread title should say "Rotate image with librpi2d"..
PS: I see the source for librpi2d is at the address you posted, I think you are going to have to customise some of the functions to swap around the vertex coordinates,
Look at Raspberry2D::makeVertices and Raspberry2D::DrawTile in rpi2d.cpp to see how the vertices are set up.
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson