Craft\Imager_JpegtranTask::runStep PHP Method

runStep() public method

public runStep ( integer $step ) : boolean
$step integer
return boolean
    public function runStep($step)
    {
        if (is_array($this->_paths)) {
            $path = $this->_paths[$step];
        } else {
            $path = $this->_paths;
        }
        // Run TinyPNG
        craft()->imager->runJpegtran($path);
        // if AWS is enabled, upload file
        if (craft()->imager->getSetting('awsEnabled')) {
            try {
                craft()->imager_aws->uploadToAWS($path);
            } catch (\Exception $e) {
                ImagerPlugin::log("Upload to AWS failed for {$path} in Imager_JpegtranTask: " . $e->getMessage(), LogLevel::Error);
            }
        }
        return true;
    }