'h' => 'height'
);
-
// Paths to command-line tools
var $exiftool = '/petabox/sw/books/exiftool/exiftool';
var $kduExpand = '/petabox/sw/bin/kdu_expand';
'ext' => 'jpg',
);
- if ($pageInfo['reduce']) {
- $requestEnv['reduce'] = $pageInfo['reduce'];
- }
- // $$$ handle scale, other sizes, rotation, etc
+ // remove non-passthrough keys from pageInfo
+ unset($pageInfo['type']);
+ unset($pageInfo['value']);
+
+ // add pageinfo to request
+ $requestEnv = array_merge($pageInfo, $requestEnv);
// Return image data - will check privs
$this->serveRequest($requestEnv);
if (!$scale) {
$scale = 1;
}
- if (array_key_exists($scale, $this->imageSizes)) {
+ if (array_key_exists($scale, self::$imageSizes)) {
$srcRatio = floatval($imageInfo['width']) / floatval($imageInfo['height']);
if ($srcRatio > 1) {
// wide
// Look for other known parts
foreach ($parts as $part) {
- if ( in_array($part, $imageSizes) ) {
+ if ( in_array($part, self::$imageSizes) ) {
$pageInfo['size'] = $part;
continue;
}