It is not much different to implement into your PHP code, and here is a basic snippet how to do it.
Required is PHP, a webserver, OSX, linux or Windows. And of course NConvert. Make the nconvert folder accessable for your PHP built. Than you can use it doing the following:
Code: Select all
//PHP
define('XNVIEW_HOME','C:/Programme/XnView/'); # Windows enviroment, Path to XnView
$cmd = XNVIEW_HOME."nconvert -out jpeg -o ".$target." -thumb 500 500 ".$source;
exec("$cmd");
To gather quickly all information about a picture, use the following:
Code: Select all
//PHP
$cmd = XNVIEW_HOME."nconvert -info ".$image;
exec("$cmd 2>&1", &$o, $r);
$return = (join("\n", $o)."\n</pre>\n");
Please note that their might be some multi user access issues concerning your server to run into some timeouts, please read therefore all information at http://www.php.net/exec which deal with calling commandline codes.
I would be greatfull about any comments on any issues with this method.
daniel