'export snapshot to image' silently fails [SOLVED]

The place to discuss anything and everything about running your LiveCode on Android

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
Traxgeek
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 281
Joined: Wed Jan 09, 2013 10:11 am

'export snapshot to image' silently fails [SOLVED]

Post by Traxgeek » Thu Oct 30, 2014 12:12 pm

Hi,

The following code line works on my desktop (both Win and Os X)...

export snapshot from rect (L, T, R, B) to image "imgSnapshot" of group "grpSnapshot"

... but not on mobile (Android)...

I've placed (and subsequently removed) an 'Answer "Got Here" ' debug line up to the 'export snapshot' line and traced LC to silently fail (I hate silent fails - soooo unhelpful ! ) at this line BUT, like I say, only with mobile (Android - haven't test on iOS yet)... Tried with and without brackets... no difference...

Any ideas as to why please ?

Thanks. Much appreciated.
Last edited by Traxgeek on Thu Oct 30, 2014 4:40 pm, edited 1 time in total.
I'm 'getting there'... just far too slowly !
Mac (Siera) and PC (Win7)
LiveCode 8.1.2 / 7.1.1

newtronsols
Posts: 192
Joined: Tue Mar 11, 2014 12:57 pm

Re: 'export snapshot to image' silently fails

Post by newtronsols » Thu Oct 30, 2014 12:47 pm

I have a line of script that works on Android:
export snapshot from group "group1" to tData as PNG

Dictionary says:
export snapshot from rect "0,0,200,200" to file "Nav.jpg" as JPEG

Traxgeek
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 281
Joined: Wed Jan 09, 2013 10:11 am

Re: 'export snapshot to image' silently fails

Post by Traxgeek » Thu Oct 30, 2014 4:37 pm

Hi newtronsols,

Thanks for helping.

My error (again :oops: ). I'd tested my idea on a desktop (naturally enough) and needed to include the offset of my stack in my 'rect' calculations. Of course (well, it's 'of course' now... wasn't a couple of hours ago :evil: ) a stack on my desktop can be anywhere, however, the stack on my Android (and it will be the same for iOS) is always (because, for mobile deployments, I'm setting 'fullscreenmode to exactfit') centred... I'd not handled the math for this / scripted in a platform change ...

My complete error.... As such the coords of the rect were 'rubbish' and the silent fail of the 'export snapshot...' command just compounded my confusion and frustration...
For info. LC doesn't seem to care should the quotes be omitted (around the rect) for either platform type; although the dictionary does indicate they are required - just an aside.

Won't do that again ! (I hope).

Thanks a million.
I'm 'getting there'... just far too slowly !
Mac (Siera) and PC (Win7)
LiveCode 8.1.2 / 7.1.1

Post Reply

Return to “Android Deployment”