export jpeg frustration
Eric Chatonet
eric.chatonet at sosmartsoftware.com
Wed Apr 13 07:10:41 EDT 2005
Hi Chris,
The export snapshot from rect of window windowID to file... does not
appear very reliable.
So convert the rect of your object to global coordinates and use export
snapshot from rect to file... instead :-)
function GlobalObjRect pRect
return item 1 of pRect + the left of this stack,item 2 of pRect + the
top of this stack,item 3 of pRect + the left of this stack,item 4 of
pRect + the top of this stack
end GlobalObjRect
Best regards,
Le 13 avr. 05, à 13:01, Chris Carroll-Davis a écrit :
> Hello folks.
>
> Can anyone shed any light on this? I'm having problems with the
> export syntax. I am trying to export an area of a window...
>
> The snippet below works fine, happily creating a jpeg in the default
> folder, but using screen coords (which I don't want)
>
> put the ticks & "temp.jpg" into tFile
> put the rect of graphic "PFrame" into pRect
> put the id of this wd into WinId
>
> put prect && winId && defaultfolder && tFile
>
> export snapshot from rect pRect to file tFile as JPEG
>
>
>
> But if (as below) I add the window parameter to use window-relative
> coords, it doesn't work. Instead, I get the error: "export: no image
> selected, or image not open". It's as if it is suddenly ignoring the
> "snapshot" form of export.
>
> put the ticks & "temp.jpg" into tFile
> put the rect of graphic "PFrame" into pRect
> put the id of this wd into WinId
> put prect && winId && defaultfolder && tFile
> export snapshot from rect pRect of window WinId to file tFile
> as JPEG
Eric Chatonet.
----------------------------------------------------------------
So Smart Software
For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch
----------------------------------------------------------------
Web site http://www.sosmartsoftware.com/
Email eric.chatonet at sosmartsoftware.com/
Phone 33 (0)1 43 31 77 62
Mobile 33 (0)6 20 74 50 86
----------------------------------------------------------------
More information about the use-livecode
mailing list