Texturing Objects with JPEGS

Started by
7 comments, last by onlinegmz 22 years, 6 months ago
Does the auxillary library support texture mapping using JPEGS? or do I need to convert them to RGB format.
Advertisement
I personally don't really like to use the Glaux library, but I don't think it supports JPEG's. What you can do is get a photo editor (Paint Shop Pro 7, Adobe, I think MSPaint can do it too) and convert it.

If you don't like that search around and look for a tutorial for loading JPEG's or find the design specs of the JPEG format and use them to create your own functions to generate the picture (I did that for the TGA and BMP formats).

Have fun!

Edited by - Viscous-Flow on October 10, 2001 10:52:36 PM

Edited by - Viscous-Flow on October 10, 2001 10:53:35 PM
JPEG''s are pretty complex (not that bad to load, but horrible to save). There is a library you can use though (it is used by a lot of browsers, among other things).

[Resist Windows XP''s Invasive Production Activation Technology!]
I''ve looked into those JPEG libs before when makeing a random desktop wallpaper program. Lets just say I stuck with bitmaps. Making any sense of the code for those libs will take you some time and a bit of programming knowledge. At least that''s my opinion. It''s still my goal, however, to make a general purpose JPEG reader/writer but I think it''ll take some time and dedication. Of course, I''ll let you guys know if I ever do.

On the other side of the coin, if anyone knows of an easy to use JPEG class or something, let me know. I''d be very appreciative.

- Mike
"The important thing to remember when programming is: When you're 90% complete, there's still 50% more to go."
I would realy hesitate at using JPEGS in 3d games. Jpegs have a compression scheme which is extremly lossy, It''s not so noticable in 2d applications however, when you get into 3d and you start mip-mapping, and blending to get the textures to look less blocky as you get closer to them, you''ll start to notice the image isn''t looking as nice and crisp as it should. If you want to conserve on file size there are other alternatives. You can use something like a .zip compression to reduce the size of the images and un-zip them at runtime when you need them. Or you can look at other formats such as .png(I''ve heard good things about this format but I don''t know what it''s compression ratio is. It uses a form of non-lossy compression though so that''s good).
Joseph FernaldSoftware EngineerRed Storm Entertainment.------------------------The opinions expressed are that of the person postingand not that of Red Storm Entertainment.
Well, on that note, there is a form of JPEG that uses non-lossy compression. Of course, it''s not very supported. Also, I would have to assume that it''s size would be on par with png''s or bitmaps in which case you''d probably use a more common format anyway.
- Mike
"The important thing to remember when programming is: When you're 90% complete, there's still 50% more to go."
I''d suggest the Intel Jpeg Library, which can be found at intel''s site.

------------------------------------------------------
Cuando miras al abismo el abismo te devuelve la mirada.
F. Nietzsche
Thanks, I'll check it out. Here's the link:

http://developer.intel.com/software/products/perflib/ijl/index.htm

- Mike

Edited by - mkaltner on October 11, 2001 5:46:14 PM
"The important thing to remember when programming is: When you're 90% complete, there's still 50% more to go."
quote:Original post by evaclear
If you want to conserve on file size there are other alternatives. You can use something like a .zip compression to reduce the size of the images and un-zip them at runtime when you need them.

That''s what I did. I created my own package format and tool to build them. For compression and decompression I used ZLib. It''s pretty easy to modify it to your own uses.

[Resist Windows XP''s Invasive Production Activation Technology!]

This topic is closed to new replies.

Advertisement