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 »

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: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Export snapshoot

Post by Klaus »

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 »

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 »

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: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Export snapshoot

Post by Klaus »

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 »

Hi,

About the JPG quality? any way of change it?

Salut,
Josep M
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Export snapshoot

Post by Klaus »

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 »

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: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Export snapshoot

Post by Klaus »

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 »

Thanks! :)
Post Reply