Jump to content
  • Advertisement

Archived

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

Bad_Maniac

How to load a .jpg onto a DirectDraw surface?

This topic is 5745 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

Yes I know there is a tutorial on this site. Yes I have read it, it uses the INTEL jpg library, wich is no longer available... any hints? Help me out please because: BMP''s are big =/ It''''s nice to be important, but it''''s more important to be nice.

Share this post


Link to post
Share on other sites
Advertisement
Hi,

with this code-sample can u load:
*.gif, *.bmp, *.tga, *.jpg, *.pcx, *.dib

http://www.gdirectx-dev.de/coding/c/dx_ddloadmulti_1/dx_ddloadmulti_1_qc.zip

cu

Share this post


Link to post
Share on other sites
Works like a charm, thanks Xaminani.
Although it''s not exzctly what I''m looking for, does anyone have a jpg loader that they actually wrote themselves, or that can be included in a program?

So that I don''t have to include a dll file in my releases all the time...

It''''s nice to be important, but it''''s more important to be nice.

Share this post


Link to post
Share on other sites
quote:

D3DXLoadSurfaceFromFile
Loads a surface from a file.
...
This function supports the following file formats: .bmp, .dds, .dib, .jpg, .png, and .tga.



Striaght from the MS docs. This is for DX8 however, so you may not be able to use it (You didn''t say which version you were using). Otherwise, check out DevIL. It can load all sorts of things, but it really only works under MSVC++.

Share this post


Link to post
Share on other sites
Take a look to http://www.voicenet.com/~richgel

this man did your own load jpg library (i think is based on ijg library, im not sure)

else, you can take a look on http://members.aol.com/olivthill/

or in jpg.org or in paintlib or in cximage, you can find it in the web easily

elgransan

Share this post


Link to post
Share on other sites
Wow, that's a lot of info, I must be able to piece together one simple Load_Jpg (filename, *surface) function from all that. it's all I need =D

if you feel like giving me charity, email me a working routine to copy and paste to the email in my profile. I'm lazy =D

[Forgot the most important part]
Thanks a lot to you guys. Your help is appreciated!

It''s nice to be important, but it''s more important to be nice.

[edited by - Bad_Maniac on October 23, 2002 4:28:32 PM]

Share this post


Link to post
Share on other sites
well, I cant help you with that, Im looking for the same think a lot because I need a library that can load a jpg from a windows resource into memory, the CxImage do that, but it size up my code +400k, and the rest of my code is about, 400k to, so, is so expensive for me.

if someone knows what I have to do, please tell me, my email elgransan@yahoo.com.ar

elgransan
from Argentina (sorry my english)

Share this post


Link to post
Share on other sites
That''s exactly what I''m after, a function to load a jpg to a surface, nothing else at all. Maybe jpg is a bad choice?

is there a "better" format, for getting compressed images, that is easier to load than jpg, but smaller than bmp?

It''''s nice to be important, but it''''s more important to be nice.

Share this post


Link to post
Share on other sites
If you get an answer, let me know.. I''m interested in loading targa''s (tga) onto ddraw surfaces....

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!