Can iRev get the dimensions of an image?
Sarah Reichelt
sarah.reichelt at gmail.com
Sat Nov 14 20:18:20 EST 2009
On Sun, Nov 15, 2009 at 11:11 AM, Sivakatirswami <katir at hindu.org> wrote:
> can the iRev engine get the dimension in width and height of an image file
> on the web server?
Here is how I do it, using ImageMagick:
-- Rev function that uses ImageMagick to get the dimensions of an image
-- returns width,height
--
function picSize pPicPath
-- ImageMagick command: identify pic.jpg
-- returns: pic.jpg JPEG 640x480 DirectClass 87kb 0.050u 0:01
put "identify " & pPicPath into tCmd
put shell(tCmd) into tSize
put word 3 of tSize into tSize
replace "x" with comma in tSize
return tSize
end picSize
Cheers,
Sarah
More information about the use-livecode
mailing list