Spritesheet bug

I mentioned before that there was an issue with images in spritesheets showing a border, presumably the surrounding images. As there may be a chance i use Solar2D, i was looking into this a bit. I think it happens for images with transparent backgrounds.

First i generated a 432 x 432 image (144x144 3x3), filled it with white then removed the centre white square.

In a new Solar2D project (default settings) i loaded the image, e.g

local sheet = graphics.newImageSheet('sheet.png', { width=144, height=144, numFrames=9 })
local image = display.newImageRect(sheet, 5, 144, 144)

image.x = display.contentCenterX
image.y = display.contentCenterY

and i see this (notice a faint white border)

Then i removed 1 px around the centre square, reloaded and the border disappeared, which is what i expected. Also when i filled the centre square with another colour, e.g red, i couldnt see any white border, my guess is that it gets overlayed above it, which is why its only noticeable on transparent backgrounds.

Another thing i noticed is that if i shift the coordinates 1 or 2 px, e.g

 image.x = display.contentCenterX + 1

the left/right or up/down border depending on x/y looks different (+ 3 makes it back the same), which make me think its some kind of render bug, cause if it was intentional changing coordinates wouldn’t make it different.

This probably isnt too big of an issue though, alll you need to do is make spritesheets have a transparent border per image, and since its mainly for animations, they’re probably setup like that anyways