image transformation in webscript

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2009 05:14 AM
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
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
Labels:
- Labels:
-
Archive
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2009 06:24 AM
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
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2009 08:30 AM
You can also define your own custom thumbnail definition to create thumbnails of your custom size. See http://wiki.alfresco.com/wiki/Thumbnail_Service
