make a jpg file
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 349
- Joined: Tue Oct 28, 2008 1:23 am
- Contact:
make a jpg file
Hello: I am using ChartsEngine to make plots and I would like to write a script to export the chart as a .jpg file. Can you help with that script?
Thanks,
Greg K
Thanks,
Greg K
Re: make a jpg file
Hi Greg,
I never worked with ChartsEngine, but can't you just take or export a "snapshot" from the "Chart"?
I am sure the resulting "chart" is a group, right?
So you could use "the rect of grp XYZ" as the reference for the screenshot.
Best
Klaus
I never worked with ChartsEngine, but can't you just take or export a "snapshot" from the "Chart"?
I am sure the resulting "chart" is a group, right?
So you could use "the rect of grp XYZ" as the reference for the screenshot.
Best
Klaus
Re: make a jpg file
Yes, chartsEngine just is a group on your stack. So you'd do something like this:
Code: Select all
on mouseUp
ask file "Where to save" with type "JPEG File|jpg|JPEG"
if it <> "" then
export snapshot from group "myChart" to it
end if
end mouseUp
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
-
- Posts: 349
- Joined: Tue Oct 28, 2008 1:23 am
- Contact:
Re: make a jpg file
ah - perfect. That works great! thanks
-
- Posts: 3
- Joined: Thu Jun 09, 2011 3:00 pm
Re: make a jpg file
For completeness, ChartMaker supports export to pdf, image file, the clipboard, and as a LiveCode object. If the 'interactive' option is selected, all this is available by a right-click popup menu in the chart itself; otherwise a scripted solution is also available using built-in syntax options.
Re: make a jpg file
For completeness, that'd be an additional expense.
ChartsEngine has it's own sub forum here:
ChartsEngine forum
ChartsEngine has it's own sub forum here:
ChartsEngine forum
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode