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 / Get Image - Unknown Image Error

Author
Message
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 17th May 2013 12:57 Edited at: 17th May 2013 13:18


I have for a long time used a piece of code that snaps a screen shot of the current game screen, applies some effects, and uses said image as the backdrop in a full screen pause menu.

I have not changed this code.

Just recently the code started to give me a series of errors. I isolated the issue to this line:

Get Image 100, 0,0, 1920, 1080, 1

Everything ahead of this executes. This is the first thing, just a screen grab, before any fancy effects. The Screen Height() and Screen Width() report 1920x1080x32 resolution.

Sometimes the error doesn't occur and instead Get Image returns no image, and the program later crashes when the game tries to delete the image that doesn't exist.

If I change the Get Image size to a much smaller area it begins to work 100% as intended.

If I add this ahead of Get Image then it magically works again 100% of the time:
While ReturnKey() = 0
SYNC
EndWhile

However adding a small series of SYNC commands in front has no effect.
It's as if a bunch of unrelated things is affecting the behavior, and literally the code has worked 100% in the past.

The only thing I can think of is I recently updated the Video driver before this sort of stuff started happening. I updated again to the latest nVidia beta drivers, hoping it would fix the issue. Nope.

I am also noticing I am having problems now loading images at 1920x1080 in png format. Sometimes they give an error "Unkown Error Loading Image". I switched to DDS format and it seemed to go away.

Specs are:
Windows 8
AMD64 (6 Cores)
16gb Ram
SLIx2 nVidia GTX460 768mb
SATA3 HD

Game Specs:
1920x1080x32
Camera is set to 0
Sync Rate 0
Sync On
Camera is Sync'd

Thanks for any suggestions.


EDIT: I'll also add the error does not occur at all running on a separate laptop. It is running at a lower resolution (1600x900) using the same compiled game executable. Dropping the resolution on the workstation does NOT solve the problem.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 17th May 2013 13:42
Quote: "Specs are:
Windows 8"


That's top of my list of suspects. No idea what to do about it though.

Strange that you are having trouble with .png images. Didn't CumQuat report similar difficulties in connection with a sound card recently? Coincidence?
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 17th May 2013 14:54 Edited at: 17th May 2013 14:59
Quote: " Didn\'t CumQuat report similar difficulties in connection with a sound card recently? Coincidence? "

Hahah yeah that was so funny... ... aww dammit.

Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 19th May 2013 21:40
Was able to magically have the problem go away by running the compiled program in Windows 7 Compatibility Mode. It's a solution, but a terrible one.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 20th May 2013 00:25
Quote: "Windows 7 Compatibility Mode"


Never seen that before. Compatibility of what with what?
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 20th May 2013 02:38
Windows 8 has an option to run programs in compatibility mode for Windows 7.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 20th May 2013 15:11
Thanks. [Note to self: steer clear of W8.]
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 20th May 2013 18:59
Quote: "[Note to self: steer clear of W8.] "

I've been saying it for months...... lol

I live for video games! (And beers, and football, and cars!)
See what I live for here: [url]http:\\www.TeamDefiant.co.uk[/url]
Michael P
20
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 20th May 2013 19:09
lol have they really changed the internals that much that they need a compatibility mode!? I thought it was just windows 7 with a new start screen..

Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 20th May 2013 22:00
It might be a change nVidia made to their drivers recently. I added a bunch of security updates and a new nVidia driver and that's when it all started.

Login to post a reply

Server time is: 2026-07-07 08:19:03
Your offset time is: 2026-07-07 08:19:03