$cmd = $unzipCmd . $this->getDecompressCmd($imageInfo, $powReduce, $rotate, $scale, $region, $stdoutLink) . $compressCmd;
trigger_error('BookReader rerunning with new cmd: ' . $cmd, E_USER_WARNING);
- //if ($this->passthruIfSuccessful($headers, $cmd, $errorMessage)) { // $$$ move to BookReaderRequest
+ $tempFile = $this->getTempFilename($ext);
+ array_push($this->tempFiles, $tempFile);
$imageCreated = $this->createOutputImage($cmd, $tempFile, $errorMessage);
if ($imageCreated) {
$recovered = true;
});
});
+
+asyncTest('Book that needs jp2 recovery since it does not contain enough reduction levels', function() {
+
+ var identifier = 'Magic-Mouse-2010-12';
+
+ expect(3);
+ var pageURI = previewURL(identifier, null, 'cover_thumb.jpg');
+
+ var img = new Image();
+ $(img).bind( 'load error', function(eventObj) {
+ equals(eventObj.type, 'load', 'Load image (' + pageURI + '). Event handler called');
+ equals(this.width, 160, 'Image width');
+ equals(this.height, 207, 'Image height');
+ start();
+ })
+ .attr('src', pageURI);
+
+});
module("Preview");
-function Book(identifier, previewWidth, coverWidth, titleWidth, bookId) {
+function Book(identifier, previewWidth, coverWidth, titleWidth, imageSize, bookId) {
this.identifier = identifier;
this.previewWidth = previewWidth;
this.coverWidth = coverWidth;
// Protected book with marked cover returned as cover
new Book('joyofsoaringtrai00conw', 2571, 2571, 2419)
+
];
for (index in books) {