Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Unable to load .jpg image

Author
Message
cartrbl
22
Years of Service
User Offline
Joined: 21st Mar 2003
Location:
Posted: 13th Apr 2006 22:21
Back again, hopefully this is a easy one. Having this weird problem loading a image as a sprite. I try to load one "sample.jpeg" and it doesn't work, error says can't load bitmap. If I do a different "sample.JPG" (yes that is how the extensions are) it loads with no problem. The only difference is the 2nd image is much larger. Anyone have this problem before?

Speak while there's time.
Dark Eternity
20
Years of Service
User Offline
Joined: 10th Jul 2004
Location: Vana Diel
Posted: 13th Apr 2006 22:23
since it says cannot load bitmap maybe you are using the load bitmap commands rather then the load image commands

I am DarkEternity (DE for short) OWNER OF ANIRE!!!
We are looking for a coder, modelers etc
cartrbl
22
Years of Service
User Offline
Joined: 21st Mar 2003
Location:
Posted: 13th Apr 2006 22:30
Here is the code I have been using. I didn't notice anything wrong so far.

Speak while there's time.
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 13th Apr 2006 22:40
jpg are no good as sprites. Use .bmp

Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 14th Apr 2006 00:46
Quote: "I try to load one "sample.jpeg" and it doesn't work"

That's because the extension is "jpg" not "jpeg"


blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 14th Apr 2006 15:03
Quote: "That's because the extension is "jpg" not "jpeg""


Or more specifically, DBC identifies what type files are by their extensions, and it doesn't know what a '.jpeg' is...

As you say yourself, it loads fine if it's renamed to a .jpg.

So do that. What's the problem?

... installing gentoo ...
cartrbl
22
Years of Service
User Offline
Joined: 21st Mar 2003
Location:
Posted: 26th Apr 2006 20:06
Just an FYI to what this issue was. I received some image files from a friend. Well the files were some other image extension (can't remember what) but he renamed them ".jpeg" instead of converting them. After I made them true ".jpg" files everything was fine.

Speak while there's time.

Login to post a reply

Server time is: 2025-05-23 14:50:10
Your offset time is: 2025-05-23 14:50:10