@anderoth
I have the same sort of issue with my masked images/groups. I sent a bug in yesterday of a simple case, and Tom explained most of it… I used a black background rect in my group, which got rid of some of the stray pixels, but I had white borders still too… I put together a test case today and sent it in that demonstrates the bug. Just as background info, my test case code was:
[lua]
– When using display.save with a masked group, a white border appears around the catpure
– Load the mask
local myMask = graphics.newMask(“160x240Mask.png”)
local myImage = display.newImageRect( “Bg02.png”, 640,960 )
myImage.x = 320
myImage.y = 480
local myObject1 = display.newRect( 10, 10, 100, 150 ) – Create a rectangle object
local myObject2 = display.newCircle( 10, 10, 50 ) – Create a circle object
local myBlackRect = display.newRect( 0, 0, 1000, 1000 ) – Create a rectangle object
myObject1:setFillColor(64,64,128,255)
myObject2:setFillColor(64,128,64,255)
local g = display.newGroup()
g:insert(myBlackRect)
g:insert(myImage)
g:insert(myObject1)
g:insert(myObject2)
g:setMask(myMask)
g:setReferencePoint( display.CenterReferencePoint )
g.maskX = g.x
g.maskY = g.y
g.maskX = 80
g.maskY = 120
– save the entire group as a new display object
display.save(g, “test.png”, system.TemporaryDirectory)
– reload the just saved image
local combined = display.newImageRect( “test.png”, system.TemporaryDirectory, 160, 240 )
combined.x, combined.y = 220, 380
print(" new image w,h == ", combined.width, combined.height)
[\lua]