The giga image viewer jQuery plugin allows you to easily replace <div> tags with animated image viewers with hotspots.
Viewer used for displaying very high-resolution JPG.
It is a completely packaged to present high resolution images on the web.
Package contains command line program (for Windows only) and php script, for cutting images into pieces (max tested image had size 9000x9000 px).
Preparing image for this plugin is easy:
Viewer displays the given high-resolution JPG inside the user-defined viewport area.
Viewer allows to control the position and zoom of the high-resolution JPG inside the viewport.
Viewer controls the sliding and zoom of the high-resolution JPG so that the viewport area will be filled completely.
The fifth example shows the usage of the lhpGigaImgViewer plugin in ligthbox gallery. This example using ColorBox, w lightweight customizable lightbox plugin for jQuery.
$(document).ready(function(){ var $cbImgViewerCnt; var settings = { 'viewportWidth' : '100%', 'viewportHeight' : '100%', 'fitToViewportShortSide' : true, 'contentSizeOver100' : false, 'startScale' : .5, 'startX' : 1860, 'startY' : 2830, 'animTime' : 500, 'draggInertia' : 10, 'imgDir' : 'sampleImgSrc_1/', 'mainImgWidth' : 5000, 'mainImgHeight' : 5000, 'intNavEnable' : true, 'intNavPos' : 'B', 'intNavAutoHide' : false, 'intNavMoveDownBtt' : true, 'intNavMoveUpBtt' : true, 'intNavMoveRightBtt' : true, 'intNavMoveLeftBtt' : true, 'intNavZoomBtt' : true, 'intNavUnzoomBtt' : true, 'intNavFitToViewportBtt' : true, 'intNavFullSizeBtt' : true, 'intNavBttSizeRation' : 1, 'mapEnable' : true, 'mapPos' : 'BL', 'popupShowAction' : 'click', 'testMode' : false }; $(".group1").colorbox({innerWidth : '600px', innerHeight : '400px', rel : 'group1'}); $(".group1").colorbox({ onComplete : function() { if($cbImgViewerCnt) { $cbImgViewerCnt.lhpGigaImgViewer('destroy'); } $cbImgViewerCnt = $('<div/>').css({'width' : '100%', 'height' : '100%', 'overflow' : 'hidden'}); $('#cboxLoadedContent').empty().append($cbImgViewerCnt); settings.imgDir = $(this).attr('href'); settings.mainImgWidth = $(this).data('main-img-width'); settings.mainImgHeight = $(this).data('main-img-height'); $cbImgViewerCnt.lhpGigaImgViewer(settings); }, onClosed : function() { if($cbImgViewerCnt) { $cbImgViewerCnt.lhpGigaImgViewer('destroy'); } } }); $('.sample img').each(function(index){ $(this).hover(function(){ $(this).stop(true, true).animate({'opacity':.4}); }, function () { $(this).stop(true, true).animate({'opacity':1}); }); }); });html code:
<!-- thumbs --> <a href="sampleImgSrc_1/" class="group1" data-main-img-width="2000" data-main-img-height="1346"> <img src="sampleImgSrc_1/thumb.jpg"/> </a> <a href="sampleImgSrc_2/" class="group1" data-main-img-width="2000" data-main-img-height="1346"> <img src="sampleImgSrc_2/thumb.jpg"/> </a> <a href="sampleImgSrc_3/" class="group1" data-main-img-width="2000" data-main-img-height="1346"> <img src="sampleImgSrc_3/thumb.jpg"/> </a> <a href="sampleImgSrc_4/" class="group1" data-main-img-width="1920" data-main-img-height="1080"> <img src="sampleImgSrc_4/thumb.jpg"/> </a> <a href="sampleImgSrc_5/" class="group1" data-main-img-width="1920" data-main-img-height="1080"> <img src="sampleImgSrc_5/thumb.jpg"/> </a>