Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is There an API Exposed? 1

Status
Not open for further replies.

BoulderBum

Programmer
Jul 11, 2002
2,179
US
I'm looking into something that will compress images programatically for a web site I want to build, and was wondering if anyone knows of a PhotoShop API to gain access to some of its compression utilities.

 
If you are attempting to resize images automatically, why not use the photoshop scripting? File>Automate>batch?

Or are you trying to do something different? The more info you give us from the get-go, the better we will be able to answer your question.

When in doubt, deny all terms and defnitions.
 
Basically, I want to resize the image to fit within certain boundaries, then compress it to save space.

Let's say that someone uploads a pic of themselves to my size that's 8 x 4. I want my script to resize it to, say, 4 x 2, and use the equivalent of the "Save For Web" quality 10 for jpegs or something.

Of course, I want this all to be handled automatically so I don't have to spend time with manual operations, hence the need for an API.

Where can I get more information about PhotoShop scripting?
 
Are you trying to have this all web based? If I understand, you are going to allow people to upload to a site and then have the pic automatically resized, no human intervention?

If so, I know there are probably apps out there that do this already, maybe a search on google would turn something up.

When in doubt, deny all terms and defnitions.
 
"no human intervention?"

That's right.

I actually did a web search for such a thing before I posted here, but haven't really come up with anything yet. Adobe has a well-featured and powerful graphics server, but at nearly $8000, I think I'll pass.

In searching for script documentation, I did notice that Adobe has some SDKs available, which are definately worth looking into. Star for pointing me in that direction.
 
I just wrote a VB application to do the custom reszing via Photoshop OLE. You should be able to write a DLL for IIS to call. This is the simple part.

The hard part is that it seems that there is not API to access the "Save for Web" functionality, so the resulting JPEG from "Save as" is always larger than that from the "Save for Web".
 
You can try to wrie an app that will do it, you can create an action to od it, and I think you can create a "droplet" to do somethign similar. But Im not real familar with doing that.

Chad


Yoderman94.com
 
I have found the way to script "Save for web". See my other post for the code in Javascript and VB.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top