If I load an image that includes non-transparent pixels around any of the edges, and then set the UV wrapping to "repeat", the image will display phantom borders around the sprite. This happens more or less, depending on the resolution or device.
Example: Three 64x64 sprites to form a 'border'. They are positioned directly adjacent to one another.
The first screenshot is with default settings,
SetImageWrapU(img, 0) and
SetImageWrapV(img, 0).
The next screenshot depicts what happens with
SetImageWrapU(img, 1) and
SetImageWrapV(img, 1) on an iPad.
I have created a demo, attached, that exhibits this behavior in Windows as well by toying with the Window Size and Virtual Resolution.
// Project: ImageUVTest
// Window Properties
SetWindowTitle( "ImageUVTest" )
SetWindowSize( 1024, 768, 0 )
SetClearColor(255, 255, 255)
SetVirtualResolution( 512, 512 )
SetPrintColor(0, 0, 0)
SetPrintSize(18)
SetGenerateMipmaps(1)
// Image and Sprite Containers
img As Integer[2]
spr As Integer[2]
// Load Images
img[0] = LoadImage("tl.png")
img[1] = LoadImage("tc.png")
img[2] = LoadImage("tr.png")
// Create Sprites
For i = 0 To 2
spr[i] = CreateSprite(img[i])
Next i
// Base Position
posX = 128
posY = 128
// Position Sprites
SetSpritePosition(img[0], posX, posY)
SetSpritePosition(img[1], GetSpriteX(img[0]) + GetSpriteWidth(img[0]) + 5, posY)
SetSpritePosition(img[2], GetSpriteX(img[1]) + GetSpriteWidth(img[1]) + 5, posY)
// UV Mode Flag
UVMode As Integer
UVMode = 0
// Main Loop
Do
// Change UV Wrap Mode on Pointer Press
If GetPointerPressed()
// Update UV Wrap Mode
UVMode = 1 - UVMode
For i = 0 To 2
SetImageWrapU(img[i], UVMode)
SetImageWrapV(img[i], UVMode)
SetSpriteUVScale(spr[i], 1.0, 1.0)
Next i
Endif
Print("Click/Touch to Change UV Mode")
Print("UV Wrap Mode: " + Str(UVMode))
Sync()
loop
https://www.dropbox.com/s/b3bdscs781wruo7/ImageUVTest.zip?dl=0