cancel
Showing results for 
Search instead for 
Did you mean: 

Webscript to return width of an image

karlovitz
Champ in-the-making
Champ in-the-making
I currently have a repository of images. I am using imagemagick to transform these images to many different sizes depending on what page they are being displayed on.  Another feature of the application is to be able to zoom on the image.  So normal flow of my application is calls for requesting 2 images one with a width of say 500 and the other ( to work with my zoom tool) to be say width of 1200.

This is currently working fine however if the image is not wider than the 1200 pixels then imagemagick will blow the image up making the the image pixelated.  I know the obvious answer is to not resize the zoom image and have it come back as the original size, however I am dealing with mostly very very large images and that would cause issues sending these images over the net.

What I am looking for is an alfresco or imagemagick tool to use inside alfresco (such as identity) that will allow me to see the width of the image and decide my max width accordingly.  Thanks for any help!

Steve
1 REPLY 1

zaizi
Champ in-the-making
Champ in-the-making
You can configure image magick to extract Image info such as size, width, etc. These can be extracted on upload as metadata into custom aspect.

Alternatively just use some of the advanced image magick options: http://www.imagemagick.org/Usage/resize/#shrink