Class SnpSaveAsPNG
Object
|
+--SnpSaveAsPNG
- class
SnpSaveAsPNG
Shows how to send files from Adobe Bridge CS5 to Adobe Photoshop CS5 to be saved in PNG format.
Usage
- Make sure you have Adobe Bridge CS5 and Adobe Photoshop CS5 running
- In ExtendScript Toolkit set Target > Bridge CS5
- In Bridge, select at least one thumbnail representing an image file of a type that you would be able to open with Adobe Photoshop CS5.
- Run this snippet
- You should see PNG image files created from the thumbnails you selected, in the same folder. The PNG image filename
should begin snp... and match the first part of the image filename originally selected; for example, if you chose image- so if you chose myImage.psd, the
output file would be snpmyImage.png.
Description
Uses interapplication messaging to send files from Bridge to Photoshop to be saved in PNG format.
Based on the thumbnail selection in Bridge, creates an array of one or more files,
and passes the serialized array to Photoshop in a BridgeTalk message. When Photoshop receives
the message, it reconstructs the array and begins processing the files.
One or more files can be selected to be saved into PNG format.
The script does not run if folders are selected.
If you try to process two files with the same filename (not counting the extension,
such as pic1.gif and pic1.psd), both files are saved as snppic1.png, so that the first
to be saved is overwritten by the second.
Defined in SnpSaveAsPNG.jsx
Field Summary |
String |
requiredContext
The context in which this snippet can run. |
Method Summary |
Boolean
|
canRun()
Determines whether snippet can be run given current context.
|
Boolean
|
run()
Functional part of this snippet.
|
requiredContext
String requiredContext
The context in which this snippet can run.
SnpSaveAsPNG
SnpSaveAsPNG()
canRun
Boolean canRun()
Determines whether snippet can be run given current context. The snippet will
fail if these preconditions are not met:
- Must run in Bridge
- Photoshop must be running
- At least one file must be selected in Bridge
Returns:
True if this snippet can run, false otherwise
run
Boolean run()
Functional part of this snippet. Creates the BridgeTalk message to send to Photoshop.
Returns:
True if the snippet ran as expected, false otherwise. Returns false if no files are selected in Bridge or Photoshop is not running.
http://www.adobe.com/devnet/bridge
Documentation generated by
JSDoc on Tue Apr 27 10:21:34 2010