Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

display.capture different behaviour in simulator and in android.
Started by gozzwick May 21 2018 09:26 AM

2 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

gozzwick

[GLOBAL: userInfoPane.html]
gozzwick
  • Observer

  • 2 posts
  • Corona SDK

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.
                 



[TOPIC: post.html]
#2

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 6,539 posts
  • Corona SDK

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

 

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


  • gozzwick likes this

[TOPIC: post.html]
#3

gozzwick

[GLOBAL: userInfoPane.html]
gozzwick
  • Observer

  • 2 posts
  • Corona SDK

Thank you, I'll check that out.




[topic_controls]
[/topic_controls]