Page 1 of 1

export snapshot - resolution and quality

Posted: Tue Jun 13, 2023 9:38 pm
by Gary Rathbone
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?

Re: export snapshot - resolution and quality

Posted: Wed Jun 14, 2023 9:51 am
by richmond62
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 3130 times

Re: export snapshot - resolution and quality

Posted: Wed Jun 14, 2023 10:23 am
by bn
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

Re: export snapshot - resolution and quality

Posted: Wed Jun 14, 2023 3:37 pm
by Gary Rathbone
Many thanks Bernd. I've adapted your code and have used snapshot from the field, not the rectangle. The quality is perfect, many thanks.

Re: export snapshot - resolution and quality

Posted: Wed Jun 14, 2023 3:39 pm
by Gary Rathbone
Many thanks Richmond. The snapshot from a field has produced a good quality image.