You are here

protected function ImageAPIOptimizeProcessorBinary::saveCommandStdoutToFile in Image Optimize (or ImageAPI Optimize) 7.2

2 calls to ImageAPIOptimizeProcessorBinary::saveCommandStdoutToFile()
ImageAPIOptimizeProcessorJfifRemove::process in plugins/imageapi_optimize/ImageAPIOptimizeProcessorJfifRemove.inc
ImageAPIOptimizeProcessorJpegTran::process in plugins/imageapi_optimize/ImageAPIOptimizeProcessorJpegTran.inc

File

plugins/imageapi_optimize/ImageAPIOptimizeProcessorBinary.inc, line 93

Class

ImageAPIOptimizeProcessorBinary

Code

protected function saveCommandStdoutToFile($cmd, $dst) {
  ob_start();
  passthru($cmd);
  $output = ob_get_contents();
  ob_end_clean();
  file_unmanaged_save_data($output, $dst, FILE_EXISTS_REPLACE);
}