Images not displaying

BlitzPlus Forums/BlitzPlus Beginners Area/Images not displaying

Hey,

I ran my code from the ide and all the images show up correctly and the game runs as it should. When i create an executable the images don't load its just black spaces.

Any ideas with whats wrong?

Thanks

Any ideas with whats wrong?
You aren't loading the images?

You know, you really could have supplied a lot more info.
-Is this a Graphics app or Windows app?
-Where are you placing the executable created? Is it located in the same place as your source .bb file?
-Are you referencing the images directly or indirectly? What I mean by that is using the images full path or the path in relation to the executable.
-Are you verifying that your images are being loaded?
If image1 = 0 Then RunTimeError("image1 did not load!")


Wolron's kinda said it all.

hm... I figure that if he creates an exe, runs it from another place on his harddisk, and thus can't find his images.. well, I figure that his app should crash when he performs any DrawImage/DrawBlock command, not draw 'black' instead..

Only alternative to this would be the creation of a temp-image when a loadable image can't be found.. like:

img=LoadImage(bla)
If Not img img=CreateImage(64,64)

This way things should at least never crash :P

Well, like I said, he should have supplied more info.

I didn't explain this very well sorry.

When i run the code in debug enabled mode, the images show correctly. When i turn debug enabled off, or create an executable the images no longer show.

doesn't tell me anything useful..

Show us your image-loading-routine and image-draw-routine..

Global SomeImage = LoadImage("image.bmp")
DrawImage SomeImage,0,0

This is what im doing to load images and display them.

hm. weird..

and it you put 'Notify SomeImage' right after loading the image.. what values do you get in debugmode, and releasemode?

more ways to debug..

put:

Notify Imagewidth(SomeImage)


Right before you're going to draw it.. (and test it @ releasemode!)

Somehow you need to make sure you do have an image in memory..

oh w8 !

now that I think about it.. do you *ever* access the image with Setbuffer Imagebuffer(SomeImage) ?

Perhaps you *think* you are back at a canvasbuffer or backbuffer and perform a CLS while in reality you're still focusing at that imagebuffer.. dunno why this could cause problems between debug- and releasemode.. but.. gotta check it all eh.. ^_^

When using Graphics (command) debug is in windowed mode whereas release mode is normally full screen unless you specifiy windowed mode with a flag.