Yes, this is true. Display.capture does not work on images larger than screen size. The following code was submitted as a BUG REPORT to Corona and is now Case 42777.
However, if you want to see this bug for yourself, run this code in a new main.lua and run it. The code itself uses text to explain what is going on so you can easily understand the BUG.
PLEASE FIX THIS ASAP as my project uses thousands of roundedRects and fixing this bug will increase my app performance substantially.
display.setStatusBar(display.HiddenStatusBar)
display.setDefault( “anchorX”, 0 )
display.setDefault( “anchorY”, 0 )
local VW = display.viewableContentWidth
local VH = display.viewableContentHeight
local cz=VH*.05
local fs=VH*.03
temp=display.newRoundedRect(0,0,VW,VH*.9,cz) --yellow rounded rect
temp:setFillColor(1,1,0)
temp2=display.newRoundedRect(VW*.1,VH*.8,VW*.8,VH,cz) --blue rounded rect
temp2:setFillColor(0,0,1)
local grp=display.newGroup()
grp:insert(temp)
grp:insert(temp2)
local grpT=display.newGroup()
local ts=“1) scroll up and down a little to see how this example group height (of two roundedRects) is greater than the screen height.\n2) Click capture to see how the height attribute of the captured image doesn’t change, although the image is reduced to the proportional height of the screen (DEFINATELY A BUG)”
local temp3 = display.newText({text=ts, x = VW*.15,y = temp2.y+10,width = VW*.7, height = 0, font = native.systemFont, fontSize = fs, align = “left”})
ts=“Screen Height:”…VH…"\nCombined Rects Height:"…grp.height
local temp4 = display.newText({text=ts, x = VW*.1,y = temp.y+(temp.height*.5),width = VW*.8, height = 0, font = native.systemFont, fontSize = fs, align = “left”})
temp4:setFillColor(0,0,0)
grpT:insert(temp3)
grpT:insert(temp4)
grp.y=-grp.height*.2 --show the group.y scrolled up a little
grpT.y=-grp.height*.2
local grpY,touchY,y --allow us to scroll and see the height of the example
local function scroll(event)
if event.phase==“began” then
grpY=grp.y
touchY=event.y
elseif event.phase==“moved” then
if grpY~=nil and touchY~=nil then
y=grpY-(touchY-event.y)
grp.y=y
grpT.y=y
end
elseif event.phase==“ended” then
grpY=nil
end
end
grp:addEventListener(“touch”,scroll)
local buttonGrp=display.newGroup()
local buttonRect=display.newRoundedRect(VW*.5,VH*.3,VW*.4,VH*.1,cz)
buttonRect:setFillColor(0,0,1)
buttonRect.strokeWidth=VW*.01
local buttonText=display.newText(“CAPTURE”,(7777),(7777),native.systemFont,VH*.04)
buttonText.x=buttonRect.x+(buttonRect.width*.5)-(buttonText.width*.5)
buttonText.y=buttonRect.y+(buttonRect.height*.5)-(buttonText.height*.5)
buttonGrp:insert(buttonRect)
buttonGrp:insert(buttonText)
local function buttonPress(event)
if event.phase==“began” then
newImage=display.capture( grp, {isFullResolution=true } )
display.remove(grp)
display.remove(buttonGrp)
ts=“Screen Height:”…VH…"\nNewImage Height:"…newImage.height
temp4.text=ts
ts=“You are now looking at the captured image. And you can see that the newImage.height attribute appears correct. But when you scroll this newImage, you will see that the objects in the group VISIBLE ON THE SCREEN ONLY were captured and NOT the entire group per the API.\n\nIn fact, you can see how the capture process actually resigned the heights of the roundedRects by looking at the corners.”
temp3.text=ts
grpT:toFront()
touchY=nil
local newImageY,touchY,y --allow us to scroll and see the height of the example
local function scroll2(event)
if event.phase==“began” then
newImageY=newImage.y
touchY=event.y
elseif event.phase==“moved” then
if newImageY~=nil and touchY~=nil then
newImage.y=newImageY-(touchY-event.y)
end
elseif event.phase==“ended” then
newImageY=nil
end
end
newImage:addEventListener(“touch”,scroll2)
end
end
buttonGrp:addEventListener(“touch”,buttonPress)