display.capture different behaviour in simulator and in android.

Hi there, I’m wondering if I am missing something obvious here, I wish my app to take screenshots and I’d really like them be saved as jpegs.  This works fine in the simulator and my files are correctly saved as jpegs with the correct name.  However when I test my app out on my phone the images are saved as png files with totally  different names.  Any idea what I’m missing?

local A4copy = display.capture( A4Group, {saveToPhotoLibrary=true, captureOffscreenArea=true} )
display.save( A4copy,

{

filename = “test” … counter … “.jpg”,

saveToPhotoLibrary=true,

baseDir=system.DocumentsDirectory,

captureOffscreenArea=true,

backgroundColor={0,0,0,0},} )

This bit of code is within a larger function could that be the source of my problem?

Thanks for your help.
                 

This may not help you immediately, but it could be modified for use on device:

https://forums.coronalabs.com/topic/72773-ssk2-screenshot-helper/

Thank you, I’ll check that out.

This may not help you immediately, but it could be modified for use on device:

https://forums.coronalabs.com/topic/72773-ssk2-screenshot-helper/

Thank you, I’ll check that out.