export snapshot - resolution and quality

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
Gary Rathbone
Posts: 39
Joined: Mon Apr 19, 2021 8:39 pm

export snapshot - resolution and quality

Post by Gary Rathbone » Tue Jun 13, 2023 9:38 pm

OK, I've spent a couple of weeks on this, I've searched the archives and the web, but it's still driving me nuts!

I've written the following code (Attachment: tCode.png)...

... to produce 'stamps' for marking assignments. When I run it the resolution / quality of the screenshot produce by Livecode is poor.

From the screen shot (Attachment: tResult.png), The top image snapshot produced by Livecode is smaller and of lower quality. The lower image is from Windows Snipping tool, which is perfect.

I use a 4K monitor which is 'scaled' (Attachment: tScreen.png)

How can I 'persuade' Livecode Community Edition to produce a quality snapshot?
Attachments
tScreen.png
tScreen.png
tResult.png
tResult.png
tCode.png
tCode.png

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9454
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: export snapshot - resolution and quality

Post by richmond62 » Wed Jun 14, 2023 9:51 am

I have a feeling that if you do this sort of thing:

Code: Select all

export snapshot from fld "CHAMPS" to file "CHAMPS.png" as PNG
You might end up with something better than using rect.

I have been wrong before. 8)

-----

Oh, and by-the-by: it is better for everyone if you can post code the way I did using this button:
-
SShot 2023-06-14 at 11.51.09.png
SShot 2023-06-14 at 11.51.09.png (2.12 KiB) Viewed 2230 times

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4027
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: export snapshot - resolution and quality

Post by bn » Wed Jun 14, 2023 10:23 am

Hi Gary,

I made a little stack that exports a snapshot from a Field. I find it easier than to create a graphic first and graphics do not scale well.
The field has not to be visible for this to work.

It uses a trick Klaus suggested for improving resolution of snapshots by taking snapshots "at size". (Klaus is one of the moderatores of this forum)

Could you test that stack in your setup?

Kind regards
Bernd
Attachments
exportSnapshotFromField.livecode.zip
(41.81 KiB) Downloaded 93 times

Gary Rathbone
Posts: 39
Joined: Mon Apr 19, 2021 8:39 pm

Re: export snapshot - resolution and quality

Post by Gary Rathbone » Wed Jun 14, 2023 3:37 pm

Many thanks Bernd. I've adapted your code and have used snapshot from the field, not the rectangle. The quality is perfect, many thanks.

Gary Rathbone
Posts: 39
Joined: Mon Apr 19, 2021 8:39 pm

Re: export snapshot - resolution and quality

Post by Gary Rathbone » Wed Jun 14, 2023 3:39 pm

Many thanks Richmond. The snapshot from a field has produced a good quality image.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”