Page 1 of 1

exporting part of a card

Posted: Thu Jan 15, 2009 8:45 pm
by Scott Richardson
Is it possible to export a "group" from a card as a PNG (or jpg) file? I have no trouble exporting any individual image files, but I need to be able to export a group (or some other method of exporting a specific area of a card that has multiple overlapping image files as one image).

Thanks for any help.

Posted: Thu Jan 15, 2009 9:07 pm
by malte
Hi,

you can use the export snapshot fromrect form.

export snapshot from rect (the rect of grp "myGroup") of grp "myGroup" to file "path/to/file" as png

should work.

Posted: Thu Jan 15, 2009 9:44 pm
by Scott Richardson
Thanks for the quick response. I have tried using the snapshot method, too, just as you have suggested, but all that shows up in the exported file is the rearmost image of the group. The other overlapping images do not appear. What happens to the rest of the group? Why only the rearmost image? Is there something else I might try?

Thanks again for any help and suggestions.

Scott

Posted: Thu Jan 15, 2009 10:43 pm
by Mark
Hi Scott,

Perhaps it should be something like:

export snapshot from rect (the rect of grp "myGroup") of cd "Your Card" to file "path/to/file" as png

Best,

Mark

Posted: Thu Jan 15, 2009 11:53 pm
by Scott Richardson
Thanks again for the quick replies, guys. Unfortunately, the approach of referring back to the card didn't work, either. If this little app was only for Mac OSX it would be so easy just to "print" the group and save as a PDF file, but I can't use that approach for Windows since that saves as XPS.

What I am trying to accomplish is to have the user build their own image for export to be used in PowerPoint (Mac or Windows) and/or Keynote (Mac), etc. They would build the image by "turning on" or "turning off" selectable items on the card.

The group prints as it should for handouts, but I still need some way to export it.

Sorry for the long post, but maybe it will help clarify what I am doing.

Thanks again.

Scott

Posted: Thu Jan 15, 2009 11:54 pm
by FourthWorld
In v2.7 the "export snapshot" command was enhanced to allow you to specify an object rather than just a rect:

export snapshot from grp "MyGroup" to file "MyImage.jpg" as jpeg

This will cause the object specified to be rendered into an offscreen buffer directly, then that buffer is compressed into the specified format for writing to disk.

This differs from the other forms of "export snapshot" in that the others merely grab a portion of the card that's already rendered, which may contain other overlapping elements.

Posted: Fri Jan 16, 2009 1:13 am
by Scott Richardson
I want to thank all of you guys. I really appreciate the forums.

I had actually tried all of these approaches, but the group still wouldn't render correctly. The problem seems to be solved — I don't know why exactly, though. Just on a whim, I decided to rename the group and try again. So I went back into the script and made sure I changed it there, too. It now works flawlessly. There were no misspellings or anything before (I even checked again before I made changes), so I am not sure what changing the name of the group had to do with anything (all I did was add two letters).

I am at a loss as to why it works now, but it does and that is fine with me.

Thanks again guys for the help and suggestions.

Scott