March 28, 2024, 02:15:00 PM

News:

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.

GWS

July 05, 2020, 10:39:17 AM Last Edit: July 06, 2020, 01:43:49 AM by GWS
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

 
Tomorrow may be too late ..

aurelCB


GWS

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. ???
Tomorrow may be too late ..