IonicWind Software

Creative Basic => 2D/3D => Topic started by: GWS on July 05, 2020, 10:39:17 AM

Title: Simple Image fault - simple solution.
Post by: GWS on July 05, 2020, 10:39:17 AM
Hi,

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 .. :)

Graham

 
Title: Re: Simple Image fault - simple solution.
Post by: aurelCB on July 11, 2020, 06:12:50 AM
Do you tryed x,y as -1 ?
Title: Re: Simple Image fault - simple solution.
Post by: GWS on July 11, 2020, 10:42:39 AM
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
endif

' 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,

Graham
______________________________________

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