CGI-Scale photos without GUI

Sivakatirswami katir at hindu.org
Sun Mar 23 16:32:10 EDT 2008


I would be interested in a runtime web app that takes incoming hi res 
photos and generates a small version. Does anyone know if references 
like the following will work in a CGI?

put url "binfile:/httpdocs/incoming/photos/humungous.jpg" into image 1

#scaling routine truncated for this discussion:

   set the rect of image "currentImage" to 0,345,0,240

create image "newImage"
set the rect of image "newImage" to the rect of img "currentImage"
 set the imagedata of img "newImage" to the imageData of img "CurrentImage"
  set the JPEGQuality to (fld "jpegSetting")
   export image "newImage" to file gCurrentFolder & tImage as JPEG

This works break on the GUI and is actually pretty speed relative to 
Photoshop's own scaling, even with image quality set to "best".

But I don't know if these are "abstract" objects (like a field or custom 
property or stack script) that will work without a GUI. of some 
interaction with a video card is required...

tks
Sivakatirswami







More information about the use-livecode mailing list