PNG Images bottom-up?

I’m trying to use the PNG loader example in HWShadowmapsSimple.java and my textures are loading upside down and backwards. I’m not real familiar with the PNG format so I don’t know if it’s normally a bottom-up rather than top-down format.

I can’t run the HWShadowmapsSimple example as I only have a GeForce2 card. But as my textures have text, it became really obvious that something is seriously wrong.

Or is there something with ImageIO that needs to be set to load the image correctly?

Are you sure you’re not placing the texture upside down? I’ve done that a few times since OpenGL does the rather unintuitive lower left being 0,0 business.

… and you have to create your polygons counter-clockwise.
it is not so unfamiliar if you an mathematician …

If you load in .png images with ImageIO you will have to do an Affine transform to flip them.

[quote]If you load in .png images with ImageIO you will have to do an Affine transform to flip them.
[/quote]
Oh, probably this mean that the origin of a PNG is top left… And Ogl textures have their origins at the bottom left.

Now I see why my textures also got bottom-up (however with wood and marble textures you hardly notice it in the first instance).

Thanks for the hint.