function imageapi_optimize_services_internal in Image Optimize (or ImageAPI Optimize) 7
Internal ImageAPI Optimize service callback.
File
- services/
internal.inc, line 161 - Internal ImageAPI Optimize service.
Code
function imageapi_optimize_services_internal($image, $dst) {
$dst = drupal_realpath($dst);
$info = imageapi_optimize_info();
foreach ($info['binaries'] as $name => $binary) {
$settings = variable_get('imageapi_optimize_' . $name, array());
if (isset($settings['status']) && $settings['status'] && $settings['path']) {
// Include binary file if defined and available.
if (isset($binary['file'])) {
include_once $binary['file'];
}
$advanced_settings = isset($settings['settings']) ? $settings['settings'] : $binary['settings'];
$binary['callbacks']['process']($image, $dst, $settings['path'], $advanced_settings);
}
}
return TRUE;
}