var img = new Image();
$(img).bind( 'load error', function(eventObj) {
equals(eventObj.type, 'load', 'Load image (' + pageURI + '). Event handler called');
- equals(this.width, 702, 'Image width');
+ equals(this.width, 701, 'Image width');
start();
})
.attr('src', pageURI);
var img = new Image();
$(img).bind( 'load error', function(eventObj) {
equals(eventObj.type, 'load', 'Load image (' + pageURI + '). Event handler called');
- equals(this.width, 244, 'Image width');
+ equals(this.width, 243, 'Image width');
start();
})
.attr('src', pageURI);
});
-asyncTest('Load image region from tiff - archive.org/download/fightingflyingc00rickgoog/page/n17_x1944_y1708_w668_h584.jpg', function() {
+asyncTest('Load image region using /download URL - populationsc18400378unit/page/n800_x1544_y4144_w1192_h848_s4.jpg', function() {
+ expect(3);
+ var pageURI = testHost() + '/download/populationsc18400378unit/page/n800_x1544_y4144_w1192_h848_s4.jpg';
+
+ var img = new Image();
+ $(img).bind( 'load error', function(eventObj) {
+ equals(eventObj.type, 'load', 'Load image (' + pageURI + '). Event handler called');
+ equals(this.width, 299, 'Image width');
+ equals(this.height, 212, 'Image height');
+ start();
+ })
+ .attr('src', pageURI);
+
+});
+
+asyncTest('Load image region from tiff, via br.getRegionURI - fightingflyingc00rickgoog - n17_x1944_y1708_w668_h584', function() {
$.getScript( jsLocateURL('fightingflyingc00rickgoog'), function() {
});
});
+
+asyncTest('Same image rotated 90 degrees, br.getRegionURI - fightingflyingc00rickgoog - n17_x1944_y1708_w668_h584_rot90', function() {
+
+ $.getScript( jsLocateURL('fightingflyingc00rickgoog'), function() {
+
+ expect(3);
+ var pageURI = br.getRegionURI(17, undefined, 90, 1944, 1708, 668, 584);
+
+ var img = new Image();
+ $(img).bind( 'load error', function(eventObj) {
+ equals(eventObj.type, 'load', 'Load image (' + pageURI + '). Event handler called');
+ equals(this.width, 584, 'Image width');
+ equals(this.height, 668, 'Image height');
+ start();
+ })
+ .attr('src', pageURI);
+
+ });
+});
+