Save the whole image group to file

Hey guys.

I was wondering if this is possible in Corona. I want to combine two pictures into one, which Im currently doing with:
 

    pic1 = display.newImage(“pic1.png”)

    pic2 = display.newImage(“pic2.png”)

    

    local bothPics = display.newGroup()

    bothPics:insert(pic1)

    bothPics:insert(pic2)

    

    

    bild2.y = bild1.contentHeight

This is just for testing purposes atm, my intention is to make a function which combies n picutres into 1. Either way, this works fine and I get the group displayning in my scrollable scrollview with ease. The only catch is that I would like to save this as one single file to the photo reel. Using display.save only saves the current visible image in the current resolution. Any way to get the whole image group into one file?

Hi @andreas44,

“display.save” can capture an entire display group, but do you want to capture the entire off-screen contents of a group that extends off in potentially-unlimited bounds?

Regards,

Brent

Hey Brent, appreciate the answer.

Yeah, I would like to capture the entire off screen contents of a group consisting of image objects. 

Not potentially unlimited, just combining N pictures into 1, where  10>N>1, and the pictures are put below each other. 

Hi Andreas,

Capturing off-screen content won’t work out of the box. I suppose one possible workaround (but maybe not ideal) is to scale the group down to fit within the screen bounds, use “display.capture”, save that to the photo reel, then scale the object back up.

http://docs.coronalabs.com/api/library/display/capture.html

Just an idea… I’m not sure it will work exactly as you need, but it’s worth a try.

Brent

I tried simply rescaling the group (with a simple bothPics.scale(x,y)) to be within the screen bounds and then display.captured with true flag, you might have meant for me to do something else…

But the picture I get in my folder isnt scalable upwards, it is caputred in the miniature size and not really viewable at all, so that didnt really help. Did I misinterpret your intention? 

Hi @andreas44,

“display.save” can capture an entire display group, but do you want to capture the entire off-screen contents of a group that extends off in potentially-unlimited bounds?

Regards,

Brent

Hey Brent, appreciate the answer.

Yeah, I would like to capture the entire off screen contents of a group consisting of image objects. 

Not potentially unlimited, just combining N pictures into 1, where  10>N>1, and the pictures are put below each other. 

Hi Andreas,

Capturing off-screen content won’t work out of the box. I suppose one possible workaround (but maybe not ideal) is to scale the group down to fit within the screen bounds, use “display.capture”, save that to the photo reel, then scale the object back up.

http://docs.coronalabs.com/api/library/display/capture.html

Just an idea… I’m not sure it will work exactly as you need, but it’s worth a try.

Brent

I tried simply rescaling the group (with a simple bothPics.scale(x,y)) to be within the screen bounds and then display.captured with true flag, you might have meant for me to do something else…

But the picture I get in my folder isnt scalable upwards, it is caputred in the miniature size and not really viewable at all, so that didnt really help. Did I misinterpret your intention?