How to generate a Texture with a jpg resource?

I want to generate a Texture with a jpg resource(Not a jpg file),but only
provide a jpg file example.How to read a jpg resourece?

There are several open source projects at that will read JPEG (and other formats) and convert them to OpenGL texture maps.

My BMGLib project uses the IJG code to read JPEGS. It will export the data in a format that can be used by OpenGL. You can download the project from my web site ( )


Thank you very much!!!