CGI-Scale photos without GUI

Sarah Reichelt sarah.reichelt at gmail.com
Sun Mar 23 17:00:33 EDT 2008


On Mon, Mar 24, 2008 at 6:32 AM, Sivakatirswami <katir at hindu.org> wrote:
> 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...


I have no idea whether objects will work without the Rev GUI, but if
they don't, perhaps you could try using the templateImage?

Cheers,
Sarah



More information about the Use-livecode mailing list