If I use ‘isFullResolution = true’, it can be captured all objects?
But I get incorrect image. Show below code.
I lost my circle object.
And image file is not png. (even filename is png)
it’s not transparent.
How can I fix it?
display.setDefault(“anchorX”, 0)
display.setDefault(“anchorY”, 0)
localbg = display.newRect(0, 0, display.actualContentWidth, display.actualContentHeight)
bg:setFillColor(1, 0, 0, 1)
local myObject1 = display.newRect( 0, 0, 100, 150 )
myObject1:setFillColor(0, 1, 0, 1)
local myObject2 = display.newCircle( 1400, 300, 50 )
myObject2:setFillColor(0, 0, 1, 1)
local group = display.newGroup()
group:insert( myObject1 )
group:insert( myObject2 )
local function cc()
local combined = display.capture( group, { saveToPhotoLibrary=true, isFullResolution=true } )
combined.x, combined.y = 100, 100
group:removeSelf()
end
timer.performWithDelay(100, cc, 1)