Quantcast

Import or export snapshot at current scaleFactor

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Import or export snapshot at current scaleFactor

prothero--- via use-livecode
I’m automating the creation of a series of images (mostly graphs or similar) to include in some non LC generated reports and I need to be able to produce them at a higher than screen resolution so that they will look ok. I was thinking that I could just increase the scaleFactor of the stack and use ‘export snapshot from <objRef>’ to create the images but they are produced at ‘normal’ resolution. The workaround (I don’t want to have to recreate everything at a larger scale because I’m also using the same LC controls to print to pdfs directly) is to use the ‘export snapshot from rect’ but that requires that everything is visible on-screen and isn’t obscured by other stuff.

I don’t suppose there is any way to use the ‘export snapshot from <objRef>’ form and get it to capture the image scaled according to the scaleFactor? And if not, is there any chance of this being supported in the future (i.e. is it worth a feature request)?

Terry...
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Import or export snapshot at current scaleFactor

prothero--- via use-livecode
Terry,

Try this

        import snapshot from ObjRef at size (the width of ObjRef * scaleBy),(the height of ObjRef * scaleBy)

Where ObjRef is the object whose snapshot you want to import and scaleBy is the scaling factor. So something like:

        import snapshot from grp 1 at size (the width of grp 1 * 2),(the height of grp 1 * 2)

If that produces an the image you need just change the command to an export snapshot command.

Jim Lambert

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Import or export snapshot at current scaleFactor

prothero--- via use-livecode
Thanks Jim, that’s perfect! I don’t know how many times I’ve looked at the import/export command in the dictionary and not seen the size modifier.

Much appreciated.

Terry...

On 6/04/2017 9:14 am, "use-livecode on behalf of Jim Lambert via use-livecode" <[hidden email] on behalf of [hidden email]> wrote:

    Terry,
   
    Try this
   
    import snapshot from ObjRef at size (the width of ObjRef * scaleBy),(the height of ObjRef * scaleBy)
   
    Where ObjRef is the object whose snapshot you want to import and scaleBy is the scaling factor. So something like:
   
    import snapshot from grp 1 at size (the width of grp 1 * 2),(the height of grp 1 * 2)
   
    If that produces an the image you need just change the command to an export snapshot command.
   
    Jim Lambert
   
    _______________________________________________
    use-livecode mailing list
    [hidden email]
    Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
    http://lists.runrev.com/mailman/listinfo/use-livecode
   
   

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Loading...