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 / Can't load my jpegs

Author
Message
Penfold
21
Years of Service
User Offline
Joined: 3rd Dec 2003
Location: RED postbox houses of parliment
Posted: 11th Dec 2003 01:05
I really hate it when your trying to do something and it compiles succesfully then you get stuck with the most stupid of problems.

I'm runnig using Dark Edit and using the following code it won't load the jpeg I want it to.

I'm not entirely sure if this is possible as the book I'm using as a rough guide only uses bitmaps for doing a basic dump on to screen pic ..(ie for a loading screen which I'm trying to use it for)

load image "loading.jpg",10

keeps giving me the cannot load bitmap error.

even if you can't use it as a screen pic the book does state that you can load jpeg as texture files. although I can't load them at all.

Is this a problem with dark edit or maybe the way I have it set up?

Any help on this would be appreciated even though it a rather stupid problem.

Ok so its not a mouse.
Clarks
21
Years of Service
User Offline
Joined: 30th Oct 2003
Location: BALTIMORE,MARYLAND
Posted: 11th Dec 2003 07:42
jpg is not supported by db classic at least i never heard of it.
you need bitmaps
richardneail
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 11th Dec 2003 11:47
I dont have clasic installed here but I am pretty sure it loads jpg files. I will check it later.

It also loads Photoshop PSD files

Rich

You might never win but if you give in will you ever know ??????
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 11th Dec 2003 12:24
It does load .jpg files.

There are a few things you could be doing wrong;

1) check your actual file, see if it's extension is .jpg, or .jpeg ( they're the same thing, just different extensions )

2) try putting in the absolute path of the image, such as "C:\blah blah\loading.jpg"

3) try saving the image into another format and try loading it again, such as a png, or a bmp ( both these formats can be saved from MS Paint ).

Hope I Helped...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Penfold
21
Years of Service
User Offline
Joined: 3rd Dec 2003
Location: RED postbox houses of parliment
Posted: 11th Dec 2003 19:50
I'll give it a go thx

Ok so its not a mouse.
Penfold
21
Years of Service
User Offline
Joined: 3rd Dec 2003
Location: RED postbox houses of parliment
Posted: 11th Dec 2003 20:15
I can get the pics to load as bmp. but unfortunatly i loose resolution on the pic.

I've tried the full path but it still doesn't load jpeg.

anybody else got any ideas?

Ok so its not a mouse.
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 12th Dec 2003 04:45
you lose resolution from changing from JPG to BMP? i thought it would be oppocite?

Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 13th Dec 2003 08:15
yeah, it should be the opposite, bmp has more information on pixel data, whereas jpeg's use compression to blend the color of nearby pixels of th esame general color to save filesize.

If it loads fine using *.bmp, try using the jpg ones again, but when loading, try loading them as .jpeg instead of .jpg

Hope I Helped...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
KNau
22
Years of Service
User Offline
Joined: 25th Nov 2002
Location: Canada
Posted: 13th Dec 2003 08:45
Also, you should be saving your bitmaps at 10 quality (if using Photoshop) or whatever the maximum quality is for your paint program. I've found that reduced quality JPEGs don't load for me.

http://www.canceriannewmedia.com
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 14th Dec 2003 22:07
Quote: "whatever the maximum quality is for your paint program"


24bit for MSPAINT.

Quote: "I've found that reduced quality JPEGs don't load for me."


thats weird. i'v never tried to use a JPG but that sounds weird that it wouldnt work...

evil stuff
21
Years of Service
User Offline
Joined: 26th Sep 2003
Location:
Posted: 15th Dec 2003 02:50
It will never work Bitmaps only works in db do you have windos 98? Sucks with everything that is db or modern

may the code be with you
Penfold
21
Years of Service
User Offline
Joined: 3rd Dec 2003
Location: RED postbox houses of parliment
Posted: 15th Dec 2003 21:44
Yeah I only have '98 and dbclassic.

I'll get myself an XP computer after crimbo sometime so maybe that will sort a few problems who knows.

I guess I'll just have to stick with bmp's/

Ok so its not a mouse.
Rage
21
Years of Service
User Offline
Joined: 9th Nov 2003
Location:
Posted: 15th Dec 2003 23:16 Edited at: 15th Dec 2003 23:31
Try to use:
load bitmap "my files/mypic.jpg",1

should works fine
if you want to load as texture use this:

load bitmap "my files/mypic.jpg",1
get image 1,0,0,512,512
delete bitmap 1

load object "my3dmodel.3ds",1
texture object 1,1



I suggest you to make textures in ".bmp" and put in the same dir. of you 3d model, so when you load your model automatically loads the textures without need to use the load that writed up. ( I'll need to learn more english)
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 15th Dec 2003 23:50
You do have the latest patch right? 1.13...

You might be getting problems if you don't....


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Penfold
21
Years of Service
User Offline
Joined: 3rd Dec 2003
Location: RED postbox houses of parliment
Posted: 16th Dec 2003 00:57
I've just re-updated my version of DB.

and it all works great now I can load jpegs and everything.

For some reason it seems the last time I updated it didn't update properly (probably human error- thats me! )

So thx for all your help anyway.

Ok so its not a mouse.
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 16th Dec 2003 02:29
lol, that's cool, that's what I'm here for, to help...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy

Login to post a reply

Server time is: 2025-05-22 01:05:45
Your offset time is: 2025-05-22 01:05:45