In the second example, do you see a tiny one-pixel green line on the right?
I don't see any green on the right, only at the bottom.
I only see green on the right when I change the image size small enough that there is one pixel of space left so that the image does not fill the width of the window - which is 479 pixels wide, then 1 pixel is showing on the right, because you have the window size set to 480 pixels wide.
Like this, I see one pixel width of green on the right:
Code: Select all
#Image_0 = 1
CreateImage(#Image_0,479,270,24,RGB(255,0,0)) ;Note that the width of the image now is 599 pixel
OpenWindow(0, 0, 0, 480, 329, "", #PB_Window_SystemMenu | #PB_Window_TitleBar | #PB_Window_ScreenCentered)
CreateMenu(0,WindowID(0))
MenuTitle("Test")
SetWindowColor(0, RGB(0,255,0))
ImageGadget(#Image_0, 0, 0, 480, 209, ImageID(#Image_0))
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
Break
EndSelect
ForEver
Why are you displaying an image bigger than the window?