Export snapshoot

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Export snapshoot

Post by JosepM » Mon May 25, 2015 7:00 pm

Hi,

I have a image of 600x1400 inside a group of 600x600 and I need export the whole 600x1400 as jpg with some images and texts that I put over the original image. I don't used export snapshoot but I see the only export the visible rect.

Any way about how export the whole size? or workaround?

Salut,
Josep M

Klaus
Posts: 13828
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Export snapshoot

Post by Klaus » Mon May 25, 2015 9:23 pm

Hi Josep,

not sure if this directly possible, but this is a nice workaround:

Code: Select all

on mouseUp
   lock screen

   ## Save current (visible) rect
   put the rect of grp 1 into tRect

   ## Resize to FULL size
   set the rect of grp 1 to the formattedrect of grp 1

   ## Take snapshot, I only imported it here
   import snapshot from rect (the rect of grp 1) of grp 1
   ## ...) of grp 1 will prevent to also "snapshot" objects that are not part of the group
   ## but are in layers on top that group! May not apply to your example, but what the egg ;-)

   ## Resize back
   set the rect of grp 1 to tRect

  ## Noone will tell the difference :-)
   unlock screen
end mouseUp
Best

Klaus

JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Re: Export snapshoot

Post by JosepM » Mon May 25, 2015 10:41 pm

Hi Klaus,

Works perfectly! :) Thanks!
The master groups that are cloned are on back so all the cloned object are inside the image group.

Just only a 2 pixels black border around the whole image that I don't know why appear.
To increase the quality of the exported snapshoot?

Salut,
Josep M

JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Re: Export snapshoot

Post by JosepM » Mon May 25, 2015 11:06 pm

Hi Klaus,

I found that if I assign manually the rect of the group I can adjust it and avoid the black border... :)

Klaus
Posts: 13828
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Export snapshoot

Post by Klaus » Tue May 26, 2015 11:53 am

Okie Dokie! :D

JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Re: Export snapshoot

Post by JosepM » Tue May 26, 2015 6:17 pm

Hi,

About the JPG quality? any way of change it?

Salut,
Josep M

Klaus
Posts: 13828
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Export snapshoot

Post by Klaus » Tue May 26, 2015 6:25 pm

Hi Josep,

you can actually set "the jpegquality" (to 1 - 100) in Livecode. :D
Or better export directly to PNG!


Best

Klaus

JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Re: Export snapshoot

Post by JosepM » Tue May 26, 2015 7:11 pm

Hi Klaus,

But I read that the jpegquality is on for export not for snapshoots,... :|
I will try the PNG... :D

Thanks Klaus,
Josep M

Klaus
Posts: 13828
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Export snapshoot

Post by Klaus » Tue May 26, 2015 8:08 pm

When you "export snapshot..." you can define the format by adding "... as JPEG" or "... as PNG".
When using JPEG the before set jpegqualtity will be used.

JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Re: Export snapshoot

Post by JosepM » Tue May 26, 2015 8:19 pm

Thanks! :)

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”