Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

vlovich

JPEG format

This topic is 5527 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m not sure if this goes into this topic, but does anyone know how JPEG stores the image. How would I go about uncompressing it and displaying it on the screen.

Share this post


Link to post
Share on other sites
Advertisement
I heard that JPEG is one of the hardest formats, maybe PNG is easier(it sure is better though) but I am not sure.
Check out www.wotsit.org

Share this post


Link to post
Share on other sites
quote:
Original post by vlovich
I''m not sure if this goes into this topic, but does anyone know how JPEG stores the image. How would I go about uncompressing it and displaying it on the screen.


DirectX (the newer versions at least) can load jpgs directly (although maybe only from VB, I can''t remember if VC has a jpg loader function). Microsoft''s IPicture and GDI+ can also load jpgs, which you can blt onto DirectX surfaces or bitmaps, or load as a texture in OpenGL. Thus you don''t need to handle the format and uncompressing yourself.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Even if you need to load a jpg yourself, it''s not too hard... so long as you don''t try to do everything yourself.

Grab the JPEG group''s code for loading a jpg. You just open the file, fill in a structure, call their load code, and close the file. Their load code takes a structure of callbacks. One is a read function (which you can make do an fread, or whatever), one is a store function (outputs a line of uncompressed data which you''ll store somewhere). That''s about all you need.

Share this post


Link to post
Share on other sites
quote:
Original post by DirectXXX
onthis site in sweat snippts section.

a sample code uses IntelJPG lib to load jpg on direct draw surface.


Unfortunately, you can no longer download the IJL (Intel JPEG Library) and their replacement is completely different. Searching around online won''t give any results either (that I could find), since most people seem to just link directly to the Intel site. If you want to use the IJL, I have a copy of the static link library and some save/load code I wrote for it ... but that''s it. (No sample source, no documentation, no dynamic link library, or dll).

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!