You are here

function _imageapi_optimize_exec in Image Optimize (or ImageAPI Optimize) 6

Same name and namespace in other branches
  1. 7 services/internal.inc \_imageapi_optimize_exec()

Saves result of a command into file

1 call to _imageapi_optimize_exec()
_imageapi_optimize_service_internal in ./imageapi_optimize.module
Uses internal tools to optimize

File

./imageapi_optimize.module, line 269
Image optimize functionalities

Code

function _imageapi_optimize_exec($cmd, $dst) {
  ob_start();
  passthru($cmd);
  $output = ob_get_contents();
  ob_end_clean();
  file_put_contents($dst, $output);
}