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 Professional Discussion / unknown image error help

Author
Message
Daniel wright 2311
User Banned
Posted: 29th Jun 2013 23:02
This used to work, now well,I get a image error



my signature keeps being erased by a mod So this is my new signature.
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 29th Jun 2013 23:18
You've got a little space there at the start of your file path.

ShellfishGames
13
Years of Service
User Offline
Joined: 6th Feb 2013
Location:
Posted: 29th Jun 2013 23:19
On which line exactly?

Maybe the file you're trying to save to already exists? Or there's a problem with the fact that your path starts with a blank (" Screen\" instead of "Screen"), not sure how DBP/Windows would deal with that.

And, although that's certainly not the cause of this error, get image should usually be used with a texture flag of 1 as additional parameter, shouldn't it? At least I can't remember a single case where that did not apply, but anyway.

chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 29th Jun 2013 23:20 Edited at: 29th Jun 2013 23:31
@Daniel wright 2311
Edited
I think I jumped the gun answering this question.

Anyway
Try this piece of code into a new folder.



I'm not a grumpy grandpa
Daniel wright 2311
User Banned
Posted: 29th Jun 2013 23:32
@chafari

Thank you, it worked, I do not understand it, my code used to work,I got it from my old code. thank you.

It could be the empty space as they said, stupid me.

my signature keeps being erased by a mod So this is my new signature.
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 30th Jun 2013 00:41
Quote: "On which line exactly?"

save image " Screen\screen.jpg",i

This would be the same as save image "C:\MyProjectFolder\ Screen\screen.jpg if that were the absolute path.

It's an inaccurate error message.

Quote: "get image should usually be used with a texture flag of 1 as additional parameter"


That's optional; the documentation indicates that this changes the filtering and stretching options.

Login to post a reply

Server time is: 2026-07-07 02:39:23
Your offset time is: 2026-07-07 02:39:23