October 06, 2022, 11:18:07 AM


IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!

Simple Image fault - simple solution.

Started by GWS, July 05, 2020, 10:39:17 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


July 05, 2020, 10:39:17 AM Last Edit: July 06, 2020, 01:43:49 AM by GWS

I'm working on a small graphics program which uses a jpeg background image.

I could not understand why a vertical white line was showing on the left hand side of the DX window when the image was displayed ???   

Initially I suspected my program was not displaying the standard 1024x768 jpeg correctly.

I tried other jpegs of the same size and there was no white line.

The solution eventually turned out to be simple.

I had cut the image from a larger image and inadvertently included a small amount of the original left hand border.

Easy solution, was to crop another small amount from the left side, and expand the image back to 1024x768 ..

All working well now .. :)


Tomorrow may be too late ..


forum for hobby programming:<br />https://aurelsoft.ucoz.com


Hi Aurel, :)

Not easy to do when using Direct X ..

' load background image ...
if dxnewmap(w,getstartpath + "image.jpg",wW,wH,1) = 0
messagebox w, "Could not load the background image","Error"
run = 0

' create a blank map filled with tile#0 ...
dxcreatemap w,1,1,0
dxdrawmap w

Just cutting a bit off the left hand side seemed the best solution. :)

All the best,


Note: I just noticed the Forum will not display a plus sign between getstartpath and the file name.  That's not good. ???
Tomorrow may be too late ..