Re: Fun with the templateimage

2020-10-15 Thread Bernard Devlin via use-livecode
This works: export snapshot from rect tRect of window tWinID at size tDim1,tDim2 to file tFile as GIF I saw a report in the forum saying that this scaled incorrectly if the snapshot was of a text field, but in my tests this was not a problem. On Thu, Oct 15, 2020 at 11:34 AM Bernard Devlin

Re: Fun with the templateimage

2020-10-15 Thread Bernard Devlin via use-livecode
Richard, just FYI The dictionary (LC 9.5.1) does say that "export snapshot ... at size x,x..." is supported since version 6.0, but I can't get it to change the size of the exported image. I'll add a note here if I get it to work. On Thu, Oct 31, 2019 at 4:38 PM Richard Gaskin via use-livecode <

Re: Fun with the templateimage

2019-10-31 Thread Klaus major-k via use-livecode
Hi Bob, > Am 31.10.2019 um 20:03 schrieb Bob Sneidar via use-livecode > : > > OK New version with error checking, and also addresses the issue where Klaus > could not compile: > > on exportScaledImage pSourceFile, pDestFile, pScaleFactor, pFormat > -- Validate parameters > -- pSourceFile

Re: Fun with the templateimage

2019-10-31 Thread Bob Sneidar via use-livecode
OK New version with error checking, and also addresses the issue where Klaus could not compile: on exportScaledImage pSourceFile, pDestFile, pScaleFactor, pFormat -- Validate parameters -- pSourceFile if not there is a file pSourceFile then \ answer error "Source file does not

Re: Fun with the templateimage

2019-10-31 Thread Bob Sneidar via use-livecode
I should put a disclaimer in the comments of any code I write: Note: The Author is not responsible for the loss of functionality or any consequences derived from to the alteration of any segment of this code. :-) Bob S > On Oct 31, 2019, at 10:37 , Bob Sneidar wrote: > > You removed the

Re: Fun with the templateimage

2019-10-31 Thread Bob Sneidar via use-livecode
You removed the parenthesis. PUT 'EM BACK! LOL! Bob S > On Oct 31, 2019, at 10:34 , Klaus major-k via use-livecode > wrote: > > Hi all, > >> On Oct 31, 2019, at 10:01 , Klaus major-k via use-livecode >> wrote: >>> >>> Hi Bob, >>> Am 31.10.2019 um 16:00 schrieb Bob Sneidar via

Re: Fun with the templateimage

2019-10-31 Thread Klaus major-k via use-livecode
Hi all, > On Oct 31, 2019, at 10:01 , Klaus major-k via use-livecode > wrote: >> >> Hi Bob, >> >>> Am 31.10.2019 um 16:00 schrieb Bob Sneidar via use-livecode >>> : >>> >>> Or better yet: -- No error checking, assumes parameters are correct. Also >>> not tested. :-) >>> >>> on

Re: Fun with the templateimage

2019-10-31 Thread Klaus major-k via use-livecode
> Am 31.10.2019 um 18:22 schrieb Bob Sneidar via use-livecode > : > > BTW do you use strict variables? NEVER! :-) > Bob S > >> On Oct 31, 2019, at 10:20 , Bob Sneidar via use-livecode >> wrote: >> >> Me too. I just tested it and got a 50% scaled image as a JPEG file. Let me >> try

Re: Fun with the templateimage

2019-10-31 Thread Bob Sneidar via use-livecode
BTW do you use strict variables? Bob S > On Oct 31, 2019, at 10:20 , Bob Sneidar via use-livecode > wrote: > > Me too. I just tested it and got a 50% scaled image as a JPEG file. Let me > try sending it to you again private email. > > Bob S

Re: Fun with the templateimage

2019-10-31 Thread Bob Sneidar via use-livecode
Me too. I just tested it and got a 50% scaled image as a JPEG file. Let me try sending it to you again private email. Bob S > On Oct 31, 2019, at 10:07 , Klaus major-k via use-livecode > wrote: > > > >> Am 31.10.2019 um 18:04 schrieb Bob Sneidar via use-livecode >> : >> >> When you

Re: Fun with the templateimage

2019-10-31 Thread Klaus major-k via use-livecode
> Am 31.10.2019 um 18:04 schrieb Bob Sneidar via use-livecode > : > > When you call the command or when you save the script? when hitting ENTER in the script editor = compiling > Mine compiled. ??? I use LC 9.5 on macOS 10.14.6 > In any case I'll update it to use DO. > > Bob S > ... >>

Re: Fun with the templateimage

2019-10-31 Thread Bob Sneidar via use-livecode
When you call the command or when you save the script? Mine compiled. In any case I'll update it to use DO. Bob S > On Oct 31, 2019, at 10:01 , Klaus major-k via use-livecode > wrote: > > Hi Bob, > >> Am 31.10.2019 um 16:00 schrieb Bob Sneidar via use-livecode >> : >> >> Or better yet:

Re: Fun with the templateimage

2019-10-31 Thread Klaus major-k via use-livecode
Hi Bob, > Am 31.10.2019 um 16:00 schrieb Bob Sneidar via use-livecode > : > > Or better yet: -- No error checking, assumes parameters are correct. Also not > tested. :-) > > on exportScaledImage pSourceFile, pDestFile, pScaleFactor, pFormat > ... > switch pFormat > case "JPEG" >

Re: Fun with the templateimage

2019-10-31 Thread Richard Gaskin via use-livecode
The "import snapshot" command had an "at size" option added several versions ago to facilitate some scaling tasks: import snapshot from the selectedObject at size 100,100 But oddly, no such option has been added to the "export snapshot" command. -- Richard Gaskin Fourth World Systems

Re: Fun with the templateimage

2019-10-31 Thread Bob Sneidar via use-livecode
Or better yet: -- No error checking, assumes parameters are correct. Also not tested. :-) on exportScaledImage pSourceFile, pDestFile, pScaleFactor, pFormat ## My good ol' banana, older users of MC might remember that one :-D set the filename of the templateimage to pSourceFile ##

Fun with the templateimage

2019-10-30 Thread Klaus major-k via use-livecode
Hi all, we know that "the templatexx" is a very helpful thingie. But I was really surprised that we can even EXPORT something from the templateimage until I tried this: - on mouseUp ## My good ol' banana, older users of MC might remember