}
/** Validate and normalize quality value to be between 1 and 100 (inclusive).
- * @param int $value quality value, will be converted to integer or 0 if invalid
- * @return bool true if the value is valid
+ * @param int $value Quality value, will be converted to integer or 0 if invalid
+ * @return bool True if the value is valid
*/
private static function validateQuality( $value ) {
return $value === 'low';
" -outfile " . wfEscapeShellArg( $params['dstPath'] ) .
" " . wfEscapeShellArg( $params['srcPath'] );
wfDebug( __METHOD__ . ": running jpgtran: $cmd\n" );
- wfProfileIn( 'jpegtran' );
$retval = 0;
$err = wfShellExecWithStderr( $cmd, $retval );
- wfProfileOut( 'jpegtran' );
if ( $retval !== 0 ) {
$this->logErrorForExternalProcess( $retval, $err, $cmd );
return parent::rotate( $file, $params );
}
}
+
+ public function supportsBucketing() {
+ return true;
+ }
+
+ public function sanitizeParamsForBucketing( $params ) {
+ $params = parent::sanitizeParamsForBucketing( $params );
+
+ // Quality needs to be cleared for bucketing. Buckets need to be default quality
+ if ( isset( $params['quality'] ) ) {
+ unset( $params['quality'] );
+ }
+
+ return $params;
+ }
}