View Full Version : Loading a JPEG as texture...
08-16-2000, 12:27 PM
Ok. I made my own .BMP loader and my own TGA loader, but I cant make a JPEG loader, I dont understand the fileformats documents I found in wotsit.org and other sites. Any of you know where can I get some code or a "good" JPEG document?
Intel has a library (Intel JPEG Library: ijl10.dll +headers+libs+...) with which you can load (and save?) JPEGs. It's also included in the OpenGL Challenge-pack and easy to use.
[This message has been edited by Marc (edited 08-16-2000).]
08-17-2000, 03:17 AM
But where can i find that library ???
08-17-2000, 03:50 AM
I found it in www.intel.com, (http://www.intel.com,) in products/search... look for the string JPEG and you will find it.
08-17-2000, 05:40 PM
Blotchy jpegs looks evil when stretched over 3d models http://www.opengl.org/discussion_boards/ubb/frown.gif
Use a lossless compression instead - png for example.
08-17-2000, 11:17 PM
The independant jpg group provides THE lib. for loading jpg at www.ijg.org (http://www.ijg.org)
This lib is 100% multi platform (win, unix, but dos, atari, amiga too...), very optimized and used by everybody...
To reply about lossless compression:
ok, but jpg at quality 10 has really no visible quality lost and are smaller than a png file. For 3d apps where size is critical (for example a game wich would be distributed only on the net), I think that jpg isn't a bad choice. Moreover, a lot of free texture available on the net are in jpeg, so you will add no gain to convert them to a lossless compression format....
Finally: q3 uses jpg http://www.opengl.org/discussion_boards/ubb/smile.gif
In my case, I use png for texture with an alpha channel and jpg for the others..
08-18-2000, 04:17 PM
Thought I would add my two cents..
I have found that using jpeg just didn't give me the quality I wanted. Maybe the images that I was using were not of a high quality... But I have done quite a bit of work with PNG and I have found it to be fast to load and the file sizes are quite small (the application I'm working on makes extensive use of very large textures 512x512 ).
There is also source code available to get you started using png for opengl textures. You can find the source at
Ideally you'll use a texture compression format that's hardware accellerated by your card. That way, you can put more textures in the card at the same time, which is what really counts.
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.