projects
/
bookreader.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2de0d1a
)
Pass through values from permalink url to image processor
author
Michael Ang
<mang@archive.org>
Tue, 27 Jul 2010 01:19:13 +0000
(
01:19
+0000)
committer
Michael Ang
<mang@archive.org>
Tue, 27 Jul 2010 01:19:13 +0000
(
01:19
+0000)
BookReaderIA/datanode/BookReaderImages.inc.php
patch
|
blob
|
history
diff --git
a/BookReaderIA/datanode/BookReaderImages.inc.php
b/BookReaderIA/datanode/BookReaderImages.inc.php
index
9d2f45e
..
d2f2208
100644
(file)
--- a/
BookReaderIA/datanode/BookReaderImages.inc.php
+++ b/
BookReaderIA/datanode/BookReaderImages.inc.php
@@
-62,7
+62,6
@@
class BookReaderImages
'h' => 'height'
);
'h' => 'height'
);
-
// Paths to command-line tools
var $exiftool = '/petabox/sw/books/exiftool/exiftool';
var $kduExpand = '/petabox/sw/bin/kdu_expand';
// Paths to command-line tools
var $exiftool = '/petabox/sw/books/exiftool/exiftool';
var $kduExpand = '/petabox/sw/bin/kdu_expand';
@@
-177,10
+176,12
@@
class BookReaderImages
'ext' => 'jpg',
);
'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);
// Return image data - will check privs
$this->serveRequest($requestEnv);
@@
-280,7
+281,7
@@
class BookReaderImages
if (!$scale) {
$scale = 1;
}
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
$srcRatio = floatval($imageInfo['width']) / floatval($imageInfo['height']);
if ($srcRatio > 1) {
// wide
@@
-791,7
+792,7
@@
class BookReaderImages
// Look for other known parts
foreach ($parts as $part) {
// Look for other known parts
foreach ($parts as $part) {
- if ( in_array($part, $imageSizes) ) {
+ if ( in_array($part,
self::
$imageSizes) ) {
$pageInfo['size'] = $part;
continue;
}
$pageInfo['size'] = $part;
continue;
}