An object can not be in two groups at once. (Unless it’s in a group within another group but it’s not the case)
That said, you can insert the same image in 2 snapshots. Using a small timer:
local snap1 = display.newSnapshot( 100, 100 ) snap1:translate( 160, 100 ) local tmp1 = display.newRect( snap1.group, 0, 0, 100, 100 ) tmp1:setFillColor( 1, 0, 1 ) local snap2 = display.newSnapshot( 100, 100 ) snap2:translate( 160, 300 ) local tmp2 = display.newRect( snap2.group, 0, 0, 100, 100 ) tmp2:setFillColor( 0, 1, 1 ) local myImage = display.newImageRect( "img.png", 80, 80 ) snap1.group:insert( myImage ) timer.performWithDelay( 1, function() snap2.group:insert( myImage ) snap2:invalidate( ) end, 1 )
However once this is done the image will be in the snap2(As I said an image can not be in multiple groups).
This means that if you after the code I put I would do something like:
snap1:invalidate( )
The snap1 is updated and you will no longer see the image in that snapshot.
Finally you can look at the documentation for more information:
https://docs.coronalabs.com/api/type/SnapshotObject/index.html
https://docs.coronalabs.com/guide/graphics/snapshot.html
I hope you help