Import/Export Snapshot

Stephen MacLean smaclean at madmansoft.com
Fri Apr 11 14:53:31 EDT 2014


Hi John,

I have an app that uses mergMK as well. 

I use export snapshot instead of import snapshot, but haven’t tested that part of it since the release of 6.6 due to finishing other parts… but will do that this weekend!

I’ve had issues with using snapshot on a card with a mergMK map on it, regardless of it’s location or visibility. I worked around it by changing the behavior of the app, but would love to revisit this as I would to be able to snapshot the map. It appears that MapKit doesn’t like to draw things offscreen, and trying to take a snapshot of it causes issues, but it’s never been confirmed one way or another.

When using the snapshot command I usually use something like this:

put empty into image "raw" of cd tLcard 
set the height of image "raw" of cd tLcard to the height of img "original" of card "Choose"
set the width of image "raw" of cd tLcard to the width of img "original" of card "Choose"
export snapshot from image "original" of card "Choose" to image "raw" of cd tLcard as PNG

I can’t remember why, at this point, why I used export snapshot instead of import snapshot, other than I probably couldn’t get it working using import.

I’ll let you know what my results are.

Best,

Steve MacLean

On Apr 11, 2014, at 2:22 PM, John Dixon <dixonja at hotmail.co.uk> wrote:

> Is anybody able to use import or export snapshot under iOS in any liveCode release after 6.5.2 ? If you can, would you please let me know how you are doing it...
> 
> In 6.5.2 in am taking a snapshot, showing it on the card at the same time as hiding a map... it is seamless, everything works perfectly... this is the script I am using...
> 
>   set the margins of the templateImage to 0
>   import snapshot from rect (0,40, the width of card "map", the height of card "map" -40 )
>   set the name of the last image of card "map" to "mapic"
>   set the topleft of the last image of this card to 0,40
> 
> These lines however, will not work in any livecode release after 6.5.2 and I need it to do so...I reported it as a 'bug', 
> 
> http://quality.runrev.com/show_bug.cgi?id=12008
> 
> but I see mention that some folks have been using export instead of import... I have tried that too but still will not play nicely... if no one has any suggestions, then I guess I will have to completely rearrange the display as 'who knows' how long it will be in the queue to be fixed..:-(
> 		 	   		  
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list