cancel
Showing results for 
Search instead for 
Did you mean: 

image transformation in webscript

shai
Champ in-the-making
Champ in-the-making
Hello,
I have a webscript for content upload, and I want to resize all images at upload time, so they all will have the same size.
I have a batch file for doing that, based on ImageMagick's transform, but I don't know how to combine it with my webscript (and if it's possible). Is there a way to call an external batch file from the webscript (like a command line shell)? or is there another way to access ImageMagick from the webscript?
I saw an article about adding image transformation options to alfresco by adding an aspect (http://wiki.alfresco.com/wiki/Using_Alfresco_for_Image_Transformation), but it didn't really help me…

Thank you!

Shai
2 REPLIES 2

gronfelt
Champ in-the-making
Champ in-the-making
The Transformation API, in the JavaScript API, allows you to access ImageMagick from a webscript:

http://wiki.alfresco.com/wiki/3.2_JavaScript_API#Transformation_API

There's a simple example in the Cookbook:

http://wiki.alfresco.com/wiki/JavaScript_API_Cookbook#Create_Document_and_Transform_it

zaizi
Champ in-the-making
Champ in-the-making
You can also define your own custom thumbnail definition to create thumbnails of your custom size. See http://wiki.alfresco.com/wiki/Thumbnail_Service