On 27 Jan 2008, at 04:55, Sivakatirswami wrote:

If it were Apple Only it would be so easy, but we need a cross platform solution. Andre is looking into SIPS (yes if you have code we could use it!)

See below for some sample code. ImageMagick would do things like resizing on multiple platforms, but I've not used to know how much installation is involved.

and he is looking at a VB /ASP solution for Windows.
But, at least for version 1.0 if photos are coming in at 2.5 Megs of smaller (typical for my users) a clean native transcript solution for the downsizing and preview thumbnails is not all that bad...open, scale down, write image data to a new image and save out... if you do it as invisible.

To be honest I've lost track of the maximum pixel dimensions that Rev can deal with in image object without having to use a QT player object instead. I just remember having problems with anything bigger than about 6 megapixels. The file size has nothing to do with it.

Professionals tend to be speed addicts and they can't stand it. they want the computer do everything right now...

Only too true... ;-)

So then we only need to write a small bit of IPTC data, data, caption, author of caption, that's about it, keywords possibly...back into the files... so that's were EXIFTools comes in.

That makes life a lot easier.


SIPS stuff:

function ijwAPLIB_SIPSRotateImage tInput, tDegrees, tOutput
if tDegrees = 0 then return true
put ijwAPLIB_MakeOSXShellPath(tInput) into tShellInput
put "sips -r" && tDegrees && tShellInput into tScript
if tOutput is not empty then
put ijwAPLIB_MakeOSXShellPath(tOutput) into tShellOutput
put space & tShellOutput after tScript
end if
return shell(tScript)
end ijwAPLIB_SIPSRotateImage

function ijwAPLIB_SIPSImageInfo tPath, tInfo
put ijwAPLIB_MakeOSXShellPath(tPath) into tPath
put "sips -g" && tInfo into tScript
put space & tPath after tScript
get shell(tScript)
return last word of it
end ijwAPLIB_SIPSImageInfo

function ijwAPLIB_MakeOSXShellPath tPath
put "set tOut to quoted form of POSIX path of tPath" into tScript
replace "tPath" with quote & revMacFromUnixPath(tPath) & quote in tScript
do tScript as applescript
put the result into tNewPath
delete char 1 of tNewPath
delete last char of tNewPath
return tNewPath
end ijwAPLIB_MakeOSXShellPath


Type 'man sips' into the terminal for a list of properties that can be retrieved, 'pixelHeight' and pixelWidth' are particularly useful for seeing if an image is small enough to load into Rev without using a QT player.
The shell path function isn't particularly pretty, but it works...

Ian
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to