display.capture() or save() doesn't work.

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)

I see. Corona can’t capture that object doesn’t show inside screen.

I’m so sad. Can you support to capture all objects?

I think it must need for many developers.

You should keep an eye on the below forum thread in order to monitor this bug:

https://forums.coronalabs.com/topic/59155-corona-bug-displaycapture-does-not-work-on-images-larger-than-screen-size

This is my idea. (-:

 

display.setDefault("anchorX", 0) display.setDefault("anchorY", 0) local bg = 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, 0, 1, 1) local ggg = display.newGroup() local g2 = display.newGroup() local gr = display.newRect(g2, 0, 0, 1, 1) gr:setFillColor(0, 0, 0, 0) local myObject2 = display.newCircle( g2, 1000, 1000, 30 ) myObject2:setFillColor(0, 0, 1, 1) g2.x, g2.y = -(g2.width - myObject2.width), -(g2.height - myObject2.height) local group = display.newGroup() group:insert( myObject1 ) group:insert( ggg ) local function cc() display.save( g2, { filename="g2.png", baseDir=system.DocumentsDirectory, isFullResolution=true, backgroundColor={1,1,0,0} } ) local copy = display.newImage(ggg, "g2.png", system.DocumentsDirectory) g2:removeSelf() display.save( group, { filename="entireGroup.png", baseDir=system.DocumentsDirectory, isFullResolution=true, backgroundColor={1,1,0,0} } ) local combined = display.newImageRect("entireGroup.png", system.DocumentsDirectory, 100, 100) group:removeSelf() end timer.performWithDelay(100, cc, 1)

I see. Corona can’t capture that object doesn’t show inside screen.

I’m so sad. Can you support to capture all objects?

I think it must need for many developers.

You should keep an eye on the below forum thread in order to monitor this bug:

https://forums.coronalabs.com/topic/59155-corona-bug-displaycapture-does-not-work-on-images-larger-than-screen-size

This is my idea. (-:

 

display.setDefault("anchorX", 0) display.setDefault("anchorY", 0) local bg = 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, 0, 1, 1) local ggg = display.newGroup() local g2 = display.newGroup() local gr = display.newRect(g2, 0, 0, 1, 1) gr:setFillColor(0, 0, 0, 0) local myObject2 = display.newCircle( g2, 1000, 1000, 30 ) myObject2:setFillColor(0, 0, 1, 1) g2.x, g2.y = -(g2.width - myObject2.width), -(g2.height - myObject2.height) local group = display.newGroup() group:insert( myObject1 ) group:insert( ggg ) local function cc() display.save( g2, { filename="g2.png", baseDir=system.DocumentsDirectory, isFullResolution=true, backgroundColor={1,1,0,0} } ) local copy = display.newImage(ggg, "g2.png", system.DocumentsDirectory) g2:removeSelf() display.save( group, { filename="entireGroup.png", baseDir=system.DocumentsDirectory, isFullResolution=true, backgroundColor={1,1,0,0} } ) local combined = display.newImageRect("entireGroup.png", system.DocumentsDirectory, 100, 100) group:removeSelf() end timer.performWithDelay(100, cc, 1)