CINXE.COM
Images – IIPImage
<!DOCTYPE html> <html lang="en-US"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-title" content="IIPImage - "> <link rel="profile" href="http://gmpg.org/xfn/11"> <link rel="pingback" href="https://iipimage.sourceforge.io/xmlrpc.php"> <link rel="Shortcut Icon" type="image/x-icon" href="/images/iip-favicon.png"/> <meta name="author" content="Ruven Pillay <ruven@users.sourceforge.io>" /> <meta name="keywords" content="IIPImage, Internet Imaging Protocol, IIP, Image Server, Visualization, High Resolution, TIFF, JPEG2000, HTML5, Multispectral, IIIF" /> <meta name="description" content="IIPImage is a high-performance image server and client for web-based streamed high resolution scientific imagery" /> <meta name="copyright" content="© 2000-2024 Ruven Pillay, All rights reservied" /> <!-- Facebook OpenGraph Metadata --> <meta property="fb:app_id" content="208864689213" /> <meta property="fb:admins" content="657173239" /> <meta property="og:site_name" content="IIPImage"/> <meta property="og:title" content="IIPImage » Images"/> <meta property="og:type" content="website"/> <meta property="og:image" content="https://iipimage.sourceforge.io/wp-content/uploads/2018/05/pyramid-269x300.png"/> <meta property="og:description" content="IIPImage is a high-performance image server and client for web-based streamed high resolution scientific imagery"/> <meta property="og:url" content="https://iipimage.sourceforge.io/documentation/images"/> <!-- Twitter Card Metadata --> <meta name="twitter:card" content="summary"> <meta name="twitter:site" content="@iipimage"> <meta name="twitter:creator" content="@iipimage"> <meta name="twitter:title" content="IIPImage » Images"> <meta name="twitter:image" content="https://iipimage.sourceforge.io/wp-content/uploads/2018/05/pyramid-269x300.png"> <meta name="twitter:description" content="IIPImage is a high-performance image server and client for web-based streamed high resolution scientific imagery"> <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-7S46T8G8KM"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-7S46T8G8KM'); gtag('require', 'linkid'); </script> <title>Images – IIPImage</title> <meta name='robots' content='max-image-preview:large' /> <link rel="alternate" type="application/rss+xml" title="IIPImage » Feed" href="https://iipimage.sourceforge.io/feed" /> <link rel="alternate" type="application/rss+xml" title="IIPImage » Comments Feed" href="https://iipimage.sourceforge.io/comments/feed" /> <script> window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/14.0.0\/72x72\/","ext":".png","svgUrl":"https:\/\/s.w.org\/images\/core\/emoji\/14.0.0\/svg\/","svgExt":".svg","source":{"concatemoji":"https:\/\/iipimage.sourceforge.io\/wp-includes\/js\/wp-emoji-release.min.js?ver=6.2.2"}}; /*! This file is auto-generated */ !function(e,a,t){var n,r,o,i=a.createElement("canvas"),p=i.getContext&&i.getContext("2d");function s(e,t){p.clearRect(0,0,i.width,i.height),p.fillText(e,0,0);e=i.toDataURL();return p.clearRect(0,0,i.width,i.height),p.fillText(t,0,0),e===i.toDataURL()}function c(e){var t=a.createElement("script");t.src=e,t.defer=t.type="text/javascript",a.getElementsByTagName("head")[0].appendChild(t)}for(o=Array("flag","emoji"),t.supports={everything:!0,everythingExceptFlag:!0},r=0;r<o.length;r++)t.supports[o[r]]=function(e){if(p&&p.fillText)switch(p.textBaseline="top",p.font="600 32px Arial",e){case"flag":return s("\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f","\ud83c\udff3\ufe0f\u200b\u26a7\ufe0f")?!1:!s("\ud83c\uddfa\ud83c\uddf3","\ud83c\uddfa\u200b\ud83c\uddf3")&&!s("\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f","\ud83c\udff4\u200b\udb40\udc67\u200b\udb40\udc62\u200b\udb40\udc65\u200b\udb40\udc6e\u200b\udb40\udc67\u200b\udb40\udc7f");case"emoji":return!s("\ud83e\udef1\ud83c\udffb\u200d\ud83e\udef2\ud83c\udfff","\ud83e\udef1\ud83c\udffb\u200b\ud83e\udef2\ud83c\udfff")}return!1}(o[r]),t.supports.everything=t.supports.everything&&t.supports[o[r]],"flag"!==o[r]&&(t.supports.everythingExceptFlag=t.supports.everythingExceptFlag&&t.supports[o[r]]);t.supports.everythingExceptFlag=t.supports.everythingExceptFlag&&!t.supports.flag,t.DOMReady=!1,t.readyCallback=function(){t.DOMReady=!0},t.supports.everything||(n=function(){t.readyCallback()},a.addEventListener?(a.addEventListener("DOMContentLoaded",n,!1),e.addEventListener("load",n,!1)):(e.attachEvent("onload",n),a.attachEvent("onreadystatechange",function(){"complete"===a.readyState&&t.readyCallback()})),(e=t.source||{}).concatemoji?c(e.concatemoji):e.wpemoji&&e.twemoji&&(c(e.twemoji),c(e.wpemoji)))}(window,document,window._wpemojiSettings); </script> <style> img.wp-smiley, img.emoji { display: inline !important; border: none !important; box-shadow: none !important; height: 1em !important; width: 1em !important; margin: 0 0.07em !important; vertical-align: -0.1em !important; background: none !important; padding: 0 !important; } </style> <link rel='stylesheet' id='wp-block-library-css' href='https://iipimage.sourceforge.io/wp-includes/css/dist/block-library/style.min.css?ver=6.2.2' media='all' /> <link rel='stylesheet' id='classic-theme-styles-css' href='https://iipimage.sourceforge.io/wp-includes/css/classic-themes.min.css?ver=6.2.2' media='all' /> <style id='global-styles-inline-css'> body{--wp--preset--color--black: #000000;--wp--preset--color--cyan-bluish-gray: #abb8c3;--wp--preset--color--white: #fff;--wp--preset--color--pale-pink: #f78da7;--wp--preset--color--vivid-red: #cf2e2e;--wp--preset--color--luminous-vivid-orange: #ff6900;--wp--preset--color--luminous-vivid-amber: #fcb900;--wp--preset--color--light-green-cyan: #7bdcb5;--wp--preset--color--vivid-green-cyan: #00d084;--wp--preset--color--pale-cyan-blue: #8ed1fc;--wp--preset--color--vivid-cyan-blue: #0693e3;--wp--preset--color--vivid-purple: #9b51e0;--wp--preset--color--blue: #0d6efd;--wp--preset--color--indigo: #6610f2;--wp--preset--color--purple: #5533ff;--wp--preset--color--pink: #d63384;--wp--preset--color--red: #dc3545;--wp--preset--color--orange: #fd7e14;--wp--preset--color--yellow: #ffc107;--wp--preset--color--green: #198754;--wp--preset--color--teal: #20c997;--wp--preset--color--cyan: #0dcaf0;--wp--preset--color--gray: #6c757d;--wp--preset--color--gray-dark: #343a40;--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple: linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%);--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan: linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%);--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange: linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%);--wp--preset--gradient--luminous-vivid-orange-to-vivid-red: linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%);--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray: linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%);--wp--preset--gradient--cool-to-warm-spectrum: linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%);--wp--preset--gradient--blush-light-purple: linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%);--wp--preset--gradient--blush-bordeaux: linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%);--wp--preset--gradient--luminous-dusk: linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%);--wp--preset--gradient--pale-ocean: linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%);--wp--preset--gradient--electric-grass: linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%);--wp--preset--gradient--midnight: linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%);--wp--preset--duotone--dark-grayscale: url('#wp-duotone-dark-grayscale');--wp--preset--duotone--grayscale: url('#wp-duotone-grayscale');--wp--preset--duotone--purple-yellow: url('#wp-duotone-purple-yellow');--wp--preset--duotone--blue-red: url('#wp-duotone-blue-red');--wp--preset--duotone--midnight: url('#wp-duotone-midnight');--wp--preset--duotone--magenta-yellow: url('#wp-duotone-magenta-yellow');--wp--preset--duotone--purple-green: url('#wp-duotone-purple-green');--wp--preset--duotone--blue-orange: url('#wp-duotone-blue-orange');--wp--preset--font-size--small: 13px;--wp--preset--font-size--medium: 20px;--wp--preset--font-size--large: 36px;--wp--preset--font-size--x-large: 42px;--wp--preset--spacing--20: 0.44rem;--wp--preset--spacing--30: 0.67rem;--wp--preset--spacing--40: 1rem;--wp--preset--spacing--50: 1.5rem;--wp--preset--spacing--60: 2.25rem;--wp--preset--spacing--70: 3.38rem;--wp--preset--spacing--80: 5.06rem;--wp--preset--shadow--natural: 6px 6px 9px rgba(0, 0, 0, 0.2);--wp--preset--shadow--deep: 12px 12px 50px rgba(0, 0, 0, 0.4);--wp--preset--shadow--sharp: 6px 6px 0px rgba(0, 0, 0, 0.2);--wp--preset--shadow--outlined: 6px 6px 0px -3px rgba(255, 255, 255, 1), 6px 6px rgba(0, 0, 0, 1);--wp--preset--shadow--crisp: 6px 6px 0px rgba(0, 0, 0, 1);}:where(.is-layout-flex){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}:where(.wp-block-columns.is-layout-flex){gap: 2em;}.has-black-color{color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-color{color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-color{color: var(--wp--preset--color--white) !important;}.has-pale-pink-color{color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-color{color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-color{color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-color{color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-color{color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-color{color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-color{color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-color{color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-color{color: var(--wp--preset--color--vivid-purple) !important;}.has-black-background-color{background-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-background-color{background-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-background-color{background-color: var(--wp--preset--color--white) !important;}.has-pale-pink-background-color{background-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-background-color{background-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-background-color{background-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-background-color{background-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-background-color{background-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-background-color{background-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-background-color{background-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-background-color{background-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-background-color{background-color: var(--wp--preset--color--vivid-purple) !important;}.has-black-border-color{border-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-border-color{border-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-border-color{border-color: var(--wp--preset--color--white) !important;}.has-pale-pink-border-color{border-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-border-color{border-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-border-color{border-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-border-color{border-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-border-color{border-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-border-color{border-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-border-color{border-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-border-color{border-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-border-color{border-color: var(--wp--preset--color--vivid-purple) !important;}.has-vivid-cyan-blue-to-vivid-purple-gradient-background{background: var(--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple) !important;}.has-light-green-cyan-to-vivid-green-cyan-gradient-background{background: var(--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan) !important;}.has-luminous-vivid-amber-to-luminous-vivid-orange-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange) !important;}.has-luminous-vivid-orange-to-vivid-red-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-orange-to-vivid-red) !important;}.has-very-light-gray-to-cyan-bluish-gray-gradient-background{background: var(--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray) !important;}.has-cool-to-warm-spectrum-gradient-background{background: var(--wp--preset--gradient--cool-to-warm-spectrum) !important;}.has-blush-light-purple-gradient-background{background: var(--wp--preset--gradient--blush-light-purple) !important;}.has-blush-bordeaux-gradient-background{background: var(--wp--preset--gradient--blush-bordeaux) !important;}.has-luminous-dusk-gradient-background{background: var(--wp--preset--gradient--luminous-dusk) !important;}.has-pale-ocean-gradient-background{background: var(--wp--preset--gradient--pale-ocean) !important;}.has-electric-grass-gradient-background{background: var(--wp--preset--gradient--electric-grass) !important;}.has-midnight-gradient-background{background: var(--wp--preset--gradient--midnight) !important;}.has-small-font-size{font-size: var(--wp--preset--font-size--small) !important;}.has-medium-font-size{font-size: var(--wp--preset--font-size--medium) !important;}.has-large-font-size{font-size: var(--wp--preset--font-size--large) !important;}.has-x-large-font-size{font-size: var(--wp--preset--font-size--x-large) !important;} .wp-block-navigation a:where(:not(.wp-element-button)){color: inherit;} :where(.wp-block-columns.is-layout-flex){gap: 2em;} .wp-block-pullquote{font-size: 1.5em;line-height: 1.6;} </style> <link rel='stylesheet' id='understrap-styles-css' href='https://iipimage.sourceforge.io/wp-content/themes/understrap/css/theme.min.css?ver=1.2.2.1680034962' media='all' /> <script src='https://iipimage.sourceforge.io/wp-includes/js/jquery/jquery.min.js?ver=3.6.4' id='jquery-core-js'></script> <script src='https://iipimage.sourceforge.io/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.4.0' id='jquery-migrate-js'></script> <link rel="https://api.w.org/" href="https://iipimage.sourceforge.io/wp-json/" /><link rel="alternate" type="application/json" href="https://iipimage.sourceforge.io/wp-json/wp/v2/pages/21" /><link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://iipimage.sourceforge.io/xmlrpc.php?rsd" /> <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="https://iipimage.sourceforge.io/wp-includes/wlwmanifest.xml" /> <meta name="generator" content="WordPress 6.2.2" /> <link rel="canonical" href="https://iipimage.sourceforge.io/documentation/images" /> <link rel='shortlink' href='https://iipimage.sourceforge.io/?p=21' /> <link rel="alternate" type="application/json+oembed" href="https://iipimage.sourceforge.io/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fiipimage.sourceforge.io%2Fdocumentation%2Fimages" /> <link rel="alternate" type="text/xml+oembed" href="https://iipimage.sourceforge.io/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fiipimage.sourceforge.io%2Fdocumentation%2Fimages&format=xml" /> <meta name="mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-title" content="IIPImage - "> <link rel="icon" href="https://iipimage.sourceforge.io/wp-content/uploads/2022/04/iip.ico" sizes="32x32" /> <link rel="icon" href="https://iipimage.sourceforge.io/wp-content/uploads/2022/04/iip.ico" sizes="192x192" /> <link rel="apple-touch-icon" href="https://iipimage.sourceforge.io/wp-content/uploads/2022/04/iip.ico" /> <meta name="msapplication-TileImage" content="https://iipimage.sourceforge.io/wp-content/uploads/2022/04/iip.ico" /> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css?family=Muli&display=swap" rel="stylesheet"> </head> <body class="page-template-default page page-id-21 page-child parent-pageid-24 wp-custom-logo wp-embed-responsive understrap-has-sidebar" itemscope itemtype="http://schema.org/WebSite"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 0 0" width="0" height="0" focusable="false" role="none" style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;" ><defs><filter id="wp-duotone-dark-grayscale"><feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 " /><feComponentTransfer color-interpolation-filters="sRGB" ><feFuncR type="table" tableValues="0 0.49803921568627" /><feFuncG type="table" tableValues="0 0.49803921568627" /><feFuncB type="table" tableValues="0 0.49803921568627" /><feFuncA type="table" tableValues="1 1" /></feComponentTransfer><feComposite in2="SourceGraphic" operator="in" /></filter></defs></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 0 0" width="0" height="0" focusable="false" role="none" style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;" ><defs><filter id="wp-duotone-grayscale"><feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 " /><feComponentTransfer color-interpolation-filters="sRGB" ><feFuncR type="table" tableValues="0 1" /><feFuncG type="table" tableValues="0 1" /><feFuncB type="table" tableValues="0 1" /><feFuncA type="table" tableValues="1 1" /></feComponentTransfer><feComposite in2="SourceGraphic" operator="in" /></filter></defs></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 0 0" width="0" height="0" focusable="false" role="none" style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;" ><defs><filter id="wp-duotone-purple-yellow"><feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 " /><feComponentTransfer color-interpolation-filters="sRGB" ><feFuncR type="table" tableValues="0.54901960784314 0.98823529411765" /><feFuncG type="table" tableValues="0 1" /><feFuncB type="table" tableValues="0.71764705882353 0.25490196078431" /><feFuncA type="table" tableValues="1 1" /></feComponentTransfer><feComposite in2="SourceGraphic" operator="in" /></filter></defs></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 0 0" width="0" height="0" focusable="false" role="none" style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;" ><defs><filter id="wp-duotone-blue-red"><feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 " /><feComponentTransfer color-interpolation-filters="sRGB" ><feFuncR type="table" tableValues="0 1" /><feFuncG type="table" tableValues="0 0.27843137254902" /><feFuncB type="table" tableValues="0.5921568627451 0.27843137254902" /><feFuncA type="table" tableValues="1 1" /></feComponentTransfer><feComposite in2="SourceGraphic" operator="in" /></filter></defs></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 0 0" width="0" height="0" focusable="false" role="none" style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;" ><defs><filter id="wp-duotone-midnight"><feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 " /><feComponentTransfer color-interpolation-filters="sRGB" ><feFuncR type="table" tableValues="0 0" /><feFuncG type="table" tableValues="0 0.64705882352941" /><feFuncB type="table" tableValues="0 1" /><feFuncA type="table" tableValues="1 1" /></feComponentTransfer><feComposite in2="SourceGraphic" operator="in" /></filter></defs></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 0 0" width="0" height="0" focusable="false" role="none" style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;" ><defs><filter id="wp-duotone-magenta-yellow"><feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 " /><feComponentTransfer color-interpolation-filters="sRGB" ><feFuncR type="table" tableValues="0.78039215686275 1" /><feFuncG type="table" tableValues="0 0.94901960784314" /><feFuncB type="table" tableValues="0.35294117647059 0.47058823529412" /><feFuncA type="table" tableValues="1 1" /></feComponentTransfer><feComposite in2="SourceGraphic" operator="in" /></filter></defs></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 0 0" width="0" height="0" focusable="false" role="none" style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;" ><defs><filter id="wp-duotone-purple-green"><feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 " /><feComponentTransfer color-interpolation-filters="sRGB" ><feFuncR type="table" tableValues="0.65098039215686 0.40392156862745" /><feFuncG type="table" tableValues="0 1" /><feFuncB type="table" tableValues="0.44705882352941 0.4" /><feFuncA type="table" tableValues="1 1" /></feComponentTransfer><feComposite in2="SourceGraphic" operator="in" /></filter></defs></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 0 0" width="0" height="0" focusable="false" role="none" style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;" ><defs><filter id="wp-duotone-blue-orange"><feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 " /><feComponentTransfer color-interpolation-filters="sRGB" ><feFuncR type="table" tableValues="0.098039215686275 1" /><feFuncG type="table" tableValues="0 0.66274509803922" /><feFuncB type="table" tableValues="0.84705882352941 0.41960784313725" /><feFuncA type="table" tableValues="1 1" /></feComponentTransfer><feComposite in2="SourceGraphic" operator="in" /></filter></defs></svg><div class="site" id="page"> <!-- ******************* The Navbar Area ******************* --> <header id="wrapper-navbar"> <a class="skip-link visually-hidden-focusable" href="#content"> Skip to content </a> <nav id="main-nav" class="navbar navbar-expand-md navbar-dark bg-primary" aria-labelledby="main-nav-label"> <h2 id="main-nav-label" class="screen-reader-text"> Main Navigation </h2> <div class="container"> <!-- Your site branding in the menu --> <a href="https://iipimage.sourceforge.io/" class="navbar-brand custom-logo-link" rel="home"><img width="79" height="77" src="https://iipimage.sourceforge.io/wp-content/uploads/2018/04/iip.png" class="img-fluid" alt="IIPImage" decoding="async" /></a> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation" > <span class="navbar-toggler-icon"></span> </button> <!-- The WordPress Menu goes here --> <div id="navbarNavDropdown" class="collapse navbar-collapse"><ul id="main-menu" class="navbar-nav ms-auto"><li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-2802" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-home menu-item-2802 nav-item"><a title="About" href="https://iipimage.sourceforge.io/" class="nav-link">About</a></li> <li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-2801" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-2801 nav-item"><a title="Blog" href="https://iipimage.sourceforge.io/blog" class="nav-link">Blog</a></li> <li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-2804" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-2804 nav-item"><a title="Demos" href="https://iipimage.sourceforge.io/demo" class="nav-link">Demos</a></li> <li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-2805" class="menu-item menu-item-type-post_type menu-item-object-page current-page-ancestor current-menu-ancestor current-menu-parent current-page-parent current_page_parent current_page_ancestor menu-item-has-children dropdown active menu-item-2805 nav-item"><a title="Documentation" href="#" data-toggle="dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="dropdown-toggle nav-link" id="menu-item-dropdown-2805">Documentation</a> <ul class="dropdown-menu" aria-labelledby="menu-item-dropdown-2805" > <li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-2812" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-2812 nav-item"><a title="Getting Started" href="https://iipimage.sourceforge.io/documentation/getting-started" class="dropdown-item">Getting Started</a></li> <li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-2813" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-2813 nav-item"><a title="Server" href="https://iipimage.sourceforge.io/documentation/server" class="dropdown-item">Server</a></li> <li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-2820" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-21 current_page_item active menu-item-2820 nav-item"><a title="Images" href="https://iipimage.sourceforge.io/documentation/images" class="dropdown-item" aria-current="page">Images</a></li> <li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-2815" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-2815 nav-item"><a title="Protocol" href="https://iipimage.sourceforge.io/documentation/protocol" class="dropdown-item">Protocol</a></li> <li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-3262" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-3262 nav-item"><a title="IIIF" href="https://iipimage.sourceforge.io/documentation/iiif" class="dropdown-item">IIIF</a></li> <li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-3434" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-3434 nav-item"><a title="Image Security" href="https://iipimage.sourceforge.io/documentation/image-security" class="dropdown-item">Image Security</a></li> <li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-2814" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-2814 nav-item"><a title="Viewers" href="https://iipimage.sourceforge.io/documentation/viewers" class="dropdown-item">Viewers</a></li> <li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-2816" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-2816 nav-item"><a title="IIPMooViewer" href="https://iipimage.sourceforge.io/documentation/iipmooviewer" class="dropdown-item">IIPMooViewer</a></li> <li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-2817" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-2817 nav-item"><a title="IIPZoom" href="https://iipimage.sourceforge.io/documentation/iipzoom" class="dropdown-item">IIPZoom</a></li> <li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-2818" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-2818 nav-item"><a title="Troubleshooting" href="https://iipimage.sourceforge.io/documentation/troubleshooting" class="dropdown-item">Troubleshooting</a></li> <li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-2819" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-2819 nav-item"><a title="Analytics" href="https://iipimage.sourceforge.io/documentation/analytics" class="dropdown-item">Analytics</a></li> <li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-2811" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-2811 nav-item"><a title="History" href="https://iipimage.sourceforge.io/documentation/history" class="dropdown-item">History</a></li> </ul> </li> <li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-2807" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-2807 nav-item"><a title="Links" href="https://iipimage.sourceforge.io/links" class="nav-link">Links</a></li> <li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-2806" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-2806 nav-item"><a title="Download" href="https://iipimage.sourceforge.io/download" class="nav-link">Download</a></li> <li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-2803" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-2803 nav-item"><a title="Contact" href="https://iipimage.sourceforge.io/contact" class="nav-link">Contact</a></li> </ul></div> </div><!-- .container(-fluid) --> </nav><!-- #main-nav --> </header><!-- #wrapper-navbar --> <div class="wrapper" id="page-wrapper"> <div class="container" id="content" tabindex="-1"> <div class="row"> <div class="col-md content-area" id="primary"> <main class="site-main" id="main"> <article class="post-21 page type-page status-publish has-post-thumbnail hentry" id="post-21"> <header class="entry-header"><h1 class="entry-title">Images</h1></header><!-- .entry-header --> <div class="entry-content"> <h2 id="images">Image Formats</h2> <p>In order to maximize the speed and efficiency of the system, the source images must be in a multi-resolution format. This allows for rapid access to individual image tiles at any resolution with minimal server overhead. The is especially important for very high resolution images. The IIPImage server supports both <a href="#TIFF">TIFF</a> and <a href="#JPEG2000">JPEG2000</a> formats. TIFF is supported by IIPImage via the <a href="https://libtiff.gitlab.io/libtiff/">libtiff</a> library with files saved in tiled multi-resolution (pyramid) format. JPEG2000 is supported through <a href="http://www.openjpeg.org/">OpenJPEG</a> or through the non-open source <a href="http://www.kakadusoftware.com" target="_blank" rel="noopener">Kakadu</a> JPEG2000 codec, which provides better performance.</p> <p>Images can be in either 8, 16 or 32 bits per channel format and in greyscale, sRGB or CIE L*a*b* colour space.</p> <h3 id="TIFF">Tiled Multi-Resolution TIFF</h3> <figure id="attachment_2845" aria-describedby="caption-attachment-2845" style="width: 300px" class="wp-caption alignright"><img decoding="async" class="size-full wp-image-2845" src="https://iipimage.sourceforge.io/wp-content/uploads/2018/05/pyramid.png" alt="" width="300" height="334" srcset="https://iipimage.sourceforge.io/wp-content/uploads/2018/05/pyramid.png 300w, https://iipimage.sourceforge.io/wp-content/uploads/2018/05/pyramid-135x150.png 135w, https://iipimage.sourceforge.io/wp-content/uploads/2018/05/pyramid-269x300.png 269w" sizes="(max-width: 300px) 100vw, 300px" /><figcaption id="caption-attachment-2845" class="wp-caption-text">Tiled Multi-Resolution Pyramid Structure</figcaption></figure> <p>The <a href="https://developer.adobe.com/content/dam/udp/en/open/standards/tiff/TIFF6.pdf" target="_blank" rel="noopener">TIFF image format</a> is an extremely flexible and powerful container allowing almost any possible type of image or even scientific data to be efficiently stored and compressed. Images can be stored in any bit depth: from 1 bit for bi-level images, through standard 8 bit images through to 32 or 64 bit floating point data. Images can consist of 1 or more channels allowing even multispectral and hyperspectral imagery to be stored in a single file. This image data can be stored in uncompressed raw form or compressed losslessly using Deflate or LZW or compressed lossily with JPEG or WebP compression for smaller file sizes.</p> <p>TIFF also allows image data to be structured in ways that allow for fast random access by means of tiling and through the creation of multi-resolution image pyramids. Tiling allows random regions from an image to be quickly decoded without the need to decode the entire image. Multiple resolutions can also be stored in a pyramid structure to allow fast access to images at any size. The combination of tiling and multi-resolution pyramids provides extremely fast random access to any part of an image at any size, allowing gigapixel or even terapixel large image or data sets to be handled comfortably.</p> <p>Tiled Multi-Resolution TIFF (or Tiled Pyramid TIFF) are standard TIFF files with each tiled resolution stored as a separate layer within the TIFF. This <a href="http://merovingio.c2rmf.cnrs.fr/iipimage/PalaisDuLouvre.tif">example TIFF image</a> can be used to test your IIPImage server.</p> <p>Tiled multi-resolution TIFFs are widely supported and can be read by most image processing libraries and applications including Photoshop, <a href="http://www.gimp.org/">GIMP</a>, <a href="http://www.imagemagick.org/">ImageMagick</a> and many others. A number of applications can also create tiled multi-resolution TIFF. Notably <a href="https://www.libvips.org/" target="_blank" rel="noopener">VIPS</a>, <a href="http://www.imagemagick.net/" target="_blank" rel="noopener">ImageMagick</a>, <a href="https://gdal.org/" target="_blank" rel="noopener">GDAL</a>, <a href="https://bio-formats.readthedocs.io/en/latest/" target="_blank" rel="noopener">Bio-Formats</a> and <a href="http://www.astromatic.net/software/stiff" target="_blank" rel="noopener">STIFF</a>.</p> <h3>Conversion using VIPS</h3> <p>The recommended way to create tiled multi-resolution TIFF images is using the high performance <a href="https://www.libvips.org/">VIPS</a> image processing suite. To generate a tiled pyramid TIFF image use <a href="https://github.com/libvips/nip2" target="_blank" rel="noopener">nip2</a>, the VIPS GUI or create one directly from the command line:</p> <pre>vips im_vips2tiff <source_image> <output_image.tif>:<compression>,tile:<size>,pyramid</pre> <ul> <li><strong>source_image</strong>: can be any kind of image supported by VIPS</li> <li><strong>output_image.tif</strong>: your TIFF output image</li> <li><strong>compression</strong>: either none, deflate, LZW or JPEG</li> <li><span style="font-weight: bold;">size</span>: pixel dimensions of tiles, eg: 256×256</li> </ul> <p>For example, to generate a TIFF with deflate compression and a tile size of 256×256, use:</p> <pre>vips im_vips2tiff source_image output_image.tif:deflate,tile:256x256,pyramid</pre> <p>It is also possible to generate tiled pyramid TIFF images with JPEG compression at quality 75:</p> <pre>vips im_vips2tiff source_image output_image.tif:jpeg:75,tile:256x256,pyramid</pre> <p>The latest version of <a href="http://www.libtiff.org" target="_blank" rel="noopener">libtiff</a> (version 4+) includes <a href="http://bigtiff.org" target="_blank" rel="noopener">BigTIFF</a> support, allowing images to go beyond the standard TIFF size limit of 4GB. To use this, make sure that both VIPS and IIPImage have been compiled and are linked to the correct version of libtiff. The conversion syntax for creating an image with VIPS is slightly different:</p> <pre>vips im_vips2tiff source_image output_image.tif:jpeg:75,tile:256x256,pyramid,,,,8</pre> <p>where the <strong>8</strong> indicates that the TIFF should be BigTIFF enabled. (The 3 blank commas before the 8 are for the optional parameters <em>format</em>,<em>resolution</em> and <em>ICC profile</em>. See the VIPS documentation for more details).</p> <p>From VIPS version 7.28 onwards, a new <a href="http://libvips.blogspot.com/2012/02/sequential-mode-read.html" target="_blank" rel="noopener">sequential mode</a> is available within VIPS which is both faster and more efficient in terms of disk access. To enable this, use the following syntax (type <span style="font-family: monospace;">vips tiffsave</span> on the command line to see a full list of options):</p> <pre>vips tiffsave source_image output_image.tif --tile --pyramid --compression deflate --tile-width 256 --tile-height 256</pre> <h3>Conversion using ImageMagick</h3> <p>You can also use <a href="http://www.imagemagick.net/">ImageMagick</a> (version <strong>6.4.7-10</strong> and upwards) to create Tiled Pyramid TIFF. In this case use the <span style="font-family: monospace;">convert</span> command. For example, to generate a 256×256 pyramid tiled tiff using JPEG compression:</p> <pre>convert input -define tiff:tile-geometry=256x256 -compress jpeg 'ptif:output.tif'</pre> <ul> <li><strong>input</strong>: source image – can be any kind of image supported by ImageMagick (almost all)</li> <li><strong>ptif</strong>: specify your image format as pyramid tiff</li> <li><strong>output.tif</strong>: output image – *MUST* have tif or ptif extension;</li> <li><strong>256×256</strong>: the tile size</li> </ul> <h3>Conversion using GDAL</h3> <p><a href="https://gdal.org/" target="_blank" rel="noopener">GDAL</a> is suite of tools for handling geospatial data formats and is part of the <a href="https://www.osgeo.org/" target="_blank" rel="noopener">The Open Source Geospatial Foundation</a>. The <a href="https://gdal.org/programs/gdaladdo.html" target="_blank" rel="noopener">gdaladdo</a> tool can be used to create tiled multi-resolution TIFF. For example, to create a JPEG-compressed tiled multi-resolution TIFF with a tile size of 256×256 pixels:</p> <pre>gdaladdo --config GDAL_TIFF_OVR_BLOCKSIZE 256 --config COMPRESS_OVERVIEW JPEG -r average -ro input.tif</pre> <p>This will create a file with an .ovr extension (input.tif.ovr), but which is in fact a standard TIFF, which can be used directly by IIPImage. The GDAL_TIFF_OVR_BLOCKSIZE parameter defines the tile size, –config COMPRESS_OVERVIEW sets the compression used (if any) and -r sets the resampling algorithm (nearest neighbour by default). See the <a href="https://gdal.org/programs/gdaladdo.html" target="_blank" rel="noopener">gdaladdo web page</a> for more information.</p> <h3>Conversion using Bio-Formats</h3> <p><a href="https://bio-formats.readthedocs.io/en/latest/" target="_blank" rel="noopener">Bio-Formats</a> is a standalone Java library for reading and writing life sciences image file formats developed by the <a href="https://www.openmicroscopy.org" target="_blank" rel="noopener">OME Open Microscopy consortium</a>. The <a href="https://bio-formats.readthedocs.io/en/latest/users/comlinetools/conversion.html" target="_blank" rel="noopener">bfconvert</a> tool can be used to create tiled multi-resolution TIFF from any supported microscopy format. For example to create a tiled pyramid TIFF with 4 resolution levels, a tile size of 256×256 and lossless Deflate compression:</p> <pre>bfconvert -pyramid-resolutions 4 -pyramid-scale 2 -tilex 256 -tiley 256 -compression zlib input.tif output.tif</pre> <h3>Conversion using STIFF</h3> <p>It is also possible to create a Tiled Pyramid TIFF from scientific data in FITS format using <a href="http://www.astromatic.net/software/stiff" target="_blank" rel="noopener">STIFF</a>. STIFF is a FITS to TIFF conversion package for astronomy data that聽 allows control of gamma, contrast,聽 brightness and color saturation and is fully compatible with IIPImage. For example to combine 3 FITS images into a single tiled multi-resolution TIFF with the specified min and max settings:</p> <pre>stiff -IMAGE TYPE TIFF-PYRAMID d1 i.fits d1 r.fits d1 g.fits -GAMMA FAC 1.1 -COLOUR SAT 2.2 -MAX TYPE MANUAL -MAX LEVEL 550,350,160 -MIN LEVEL 0.00001 -SATUR LEVEL 10000 -COMPRESSION TYPE DEFLATE -OUTFILE NAME d1 gri.ptif</pre> <p>See the <a href="https://github.com/astromatic/stiff/raw/master/doc/stiff.pdf" target="_blank" rel="noopener">STIFF documentation</a> for more details on how to use it and the options available.</p> <h2 id="JPEG2000">JPEG2000</h2> <p><a href="http://www.jpeg.org/jpeg2000" target="_blank" rel="noopener">JPEG2000</a> is an advanced wavelet-based image compression and coding format that gives improved compression over standard JPEG and much greater flexibility with support for multi-resolution coding, multiple bit-depths, region-of-interest, quality layers and lossless compression. Images can be in 1, 8 or 16 bits per channel and both the jp2 (JPEG2000 Part 1 ISO/IEC 15444-1), jpx聽 (JPEG2000 Part 2 ISO/IEC 15444-2) and jph (JPEG2000 Part 15 ISO/IEC 15444-15) formats are supported. Note that jpc raw JPEG2000 codestreams are not yet supported.</p> <p>If you wish to use JPEG2000, you will need to compile the IIPImage server with either OpenJPEG or Kakadu. <a href="https://www.openjpeg.org/">OpenJPEG</a> is an open source library that provides full support for JPEG2000. The <a href="https://kakadusoftware.com/" target="_blank" rel="noopener">Kakadu</a> JPEG2000 codec is a widely used commercial codec which provides significantly faster JPEG2000 decoding. It is. however, not open source –聽 you will have to purchase a copy of the SDK from Kakadu in order to use it (if you are interested in obtaining pre-built binaries of the IIPImage server with Kakadu included for commercial use, please <a href="mailto:iipimage@gmail.com">contact us</a>).</p> <h3>Optimizing JPEG2000 Encoding Parameters</h3> <p>Any JPEG2000 image can be used with IIPImage, but in order to get the best performance, you should encode your images in an optimal way for fast random access. The key parameters for this are:</p> <ul> <li><strong>Resolution levels</strong>: A sufficient number of resolution levels should be created. The number required depends on the size of the image. Each resolution is a factor of 2 smaller than the next, so for images of around 2000×2000 pixels in size, 5 levels should be sufficient, for 4000×4000 6 levels and for 8000×8000 7 levels etc.</li> <li><strong>Resolution-based progression order</strong> (RPCL): In order to allow efficient access to different resolutions, a resolution-based progression order should be used by setting the progression order to Resolution –聽 Component – Position – Layer (RPCL)</li> <li><strong>Precincts</strong> (256×256): Precincts allow decoding to be carried out only of specific regions (in the same way that tiling works with TIFF). Precinct sizes should be the same as the size of the tiles that will be requested by tile-based viewers (typically 256×256 pixels)</li> <li><strong>Code blocks</strong> (64×64): Code blocks help further with random access and should be as large as possible, with the maximum allowed size being 64×64 pixels.</li> <li><strong>Markers</strong>: Adding markers to a JPEG2000 image can make significant improvements to decoding speed. <strong>PLT</strong> packet length markers add a packet index to the file header which allows faster access to resolution levels and regions within an image. <strong>TLM</strong> tile part length markers provide a coarser index that can be used if a decoder does not support <strong>PLT</strong> markers. Although not related to decoding speed, the use of packet markers such as <strong>SOP</strong> (Start of Packet) or <strong>EPH</strong> (End of Packet Header) is also recommended and provides a level of error resiliency and allows decoding to continue even in the presence of file corruption.</li> <li><strong>HTJ2K</strong>: If you are using iipsrv with a recent version of Kakadu (>8.3) or OpenJPEG (>2.5), encoding files using the High Throughput extension to JPEG2000 (HTJ2K) can also make a significant difference to decoding performance with up to 2x faster decoding speed for lossy compression.</li> </ul> <p>JPEG2000 supports the encoding of quality layers. The decoding of specific quality layers is supported by IIPImage, but this necessarily slows down decoding. Quality layers in JPEG2000 should, therefore, only be created during encoding if you wish to use this feature to allow IIPImage to limit decoding to lower quality versions of the image.</p> <p>It is also possible to use tiling within JPEG2000, but the existence of precincts and code blocks largely replicates the features of the tiled pyramid structure used by TIFF making JPEG2000 tiling unnecessary and often even counter-productive for fast random access. Unlike with tiled pyramid TIFF, tiling with JPEG2000 is only applied to the full size image and not the sub-resolutions. Accessing a lower resolution, therefore, requires accessing every tile, which will make decoding speed slower. Moreover, it is not recommended to use tiling when using <em>lossy</em> JPEG2000 compression as compression artifacts can be visible at tile boundaries (compression artifacts are not an issue with lossless encoding).</p> <h3>Encoding with Kakadu</h3> <p>In order to encode using Kakadu, you can use the <span style="font-family: monospace;">kdu_compress</span> command line tool. The key parameters are <span style="font-family: monospace;">Clayers</span> (number of quality layers), <span style="font-family: monospace;">Clevels</span> (number of resolutions), <span style="font-family: monospace;">Cprecincts</span> (precinct size – which are tiles in the wavelet domain), <span style="font-family: monospace;">Cblk</span> (code block size), <span style="font-family: monospace;">Corder</span> (encoding compression order – RPCL for resolution encoding) and <span style="font-family: monospace;">rate</span> (compression rate).</p> <p>For example, to create a lossy encoded JPEG2000 (part 1) image with 1 quality layer, 7 resolutions, precincts of size 256×256, code blocks of size 64×64, multi-resolution encoding and a compression rate of 2.5:</p> <pre>kdu_compress -i input.tif -o output.jp2 -rate 2.5 Clayers=1 Clevels=7 Cprecincts="{256,256}" Corder=RPCL Cblk="{64,64}" ORGgen_plt=yes ORGplt_parts=R ORGtparts=R ORGgen_tlm=8 Cuse_sop=yes</pre> <p>The <span style="font-family: monospace;">ORGgen_plt</span> and <span style="font-family: monospace;">ORGplt_parts</span> parameters enable PLT markers and specify that these should be divided according to resolution level (R). <span style="font-family: monospace;">ORGgen_tlm</span> and <span style="font-family: monospace;">ORGtparts </span>enables tile part length markers and defines how these are divided. <span style="font-family: monospace;">ORGgen_tlm </span>should be set to the number of resolutions levels + 1. Thus, if you have asked for 7 resolution levels, there should be 8 TLM marker segments. <span style="font-family: monospace;">ORGtparts</span> should be set to resolution level (R).</p> <p>The <span style="font-family: monospace;">Cuse_sop=yes</span> parameter adds packet synchronization markers for error robustness.</p> <p>To create the same lossy encoded image using the faster HTJ2K to produce an output file in <code>jph</code> format:</p> <pre>kdu_compress -i input.tif -o output.jph Cmodes=HT -rate 2.5 Clevels=7 Cprecincts="{256,256}" Corder=RPCL Cblk="{64,64}" ORGgen_plt=yes ORGplt_parts=R ORGtparts=R ORGgen_tlm=8 Cuse_sop=yes</pre> <p>Although not recommended for performance reasons, if you wish, nonetheless, to add tiling, this can be done through the <span style="font-family: monospace;">Stiles</span> parameter. For example, to use a a tile size of 1024×1024 pixels, add the following parameters to the above command:</p> <pre>Stiles="{1024,1024}"</pre> <p>It is also possible to encode losslessly using the<span style="font-family: monospace;"> Creversible=yes </span>parameter. Lossless encoding with JPEG2000 is capable of reducing file size to around 40% of the original raw data size. Several quality layers can also be included if you wish to keep a lossless archive image, but allow users to have fast access to only a lower quality lossy version of the image.</p> <h3>Encoding with OpenJPEG</h3> <p><a href="https://www.openjpeg.org/" target="_blank" rel="noopener">OpenJPEG</a> also provides command line tools to encode images. To create a lossy encoded JPEG2000 (part 1) image with 1 quality layer, 7 resolutions, precincts of size 256×256, code blocks of size 64×64, multi-resolution encoding, a compression rate of 2.5 and including PLT, TLM and SOP markers:</p> <pre>opj_compress -i input.tif -o output.jp2 -r 2.5 -n 7 -c "[256,256]" -b "64,64" -p RPCL -SOP -PLT -TLM -TP R -SOP</pre> <p>If no rate parameter is specified, encoding is performed losslessly. If tiling is required, add the following parameters, where -t specifies the desired tile size:</p> <pre>-t 1024,1024</pre> <h2>Image File Names</h2> <p>The image paths given to the IIPImage server (via the FIF command for IIP requests or IIIF for IIIF requests) must be <strong>absolute system paths</strong> on the server machine (eg. FIF=/images/test.tif) and <strong>not</strong> paths relative to the web server document root location. Don’t forget to make sure the IIPImage server process owner has read access on the images! On Windows, you should still use forward slashes “/” for the image path, not “\” and there is no need for the “c:” prefix.</p> <p>In addition, the server’s FILESYSTEM_PREFIX configuration variable allows you to define a prefix that is pre-pended to each path. For example, if FILESYSTEM_PREFIX is set to “/mnt/images/”, all paths provided to the server will have this prefix added to the beginning. Thus a request for an image 001.tif will be mapped to /mnt/images/001.tif.</p> <p>Similarly, the FILESYSTEM_SUFFIX configuration variable allows you to define a suffix that is added to the file name. For example, if you set FILESYSTEM_SUFFIX to “.tif”, a request to an image 001 will be mapped to 001.tif.</p> <p>Note that聽<code>iipsrv</code> uses <a href="https://www.garykessler.net/library/file_sigs.html">magic file signatures</a> to determine the input image type and does not make use of image suffixes such as .tif or .jp2. It is, therefore, possible to use arbitrary suffix-less image names.</p> </div><!-- .entry-content --> <footer class="entry-footer"> </footer><!-- .entry-footer --> </article><!-- #post-21 --> </main> </div><!-- #primary --> </div><!-- .row --> </div><!-- #content --> </div><!-- #page-wrapper --> <div class="wrapper" id="wrapper-footer"> <div class="container"> <div class="row" itemscope itemtype="http://schema.org/Organization"> <meta itemprop="logo" content="https://iipimage.sourceforge.io/images/iip_logo.png" /> <div class="col-1 logo"><a itemprop="url" href="https://iipimage.sourceforge.io"><img alt="logo" src="https://iipimage.sourceforge.io/images/iip.png"/></a><span itemprop="name">IIPImage</span></div> <div class="col-11"> <footer class="site-footer" id="colophon"> <div class="social"> <a itemprop="sameAs" href="https://www.twitter.com/IIPImage"><i class="fa fa-twitter"></i></a> <a itemprop="sameAs" href="https://www.facebook.com/IIPImage"><i class="fa fa-facebook"></i></a> <a itemprop="sameAs" href="https://www.linkedin.com/company/iipimage/"><i class="fa fa-linkedin"></i></a> <a itemprop="sameAs" href="https://github.com/ruven/"><i class="fa fa-github"></i></a> <a href="/feed"><i class="fa fa-rss"></i></a> </div> <div class="site-info"> Copyright © 2024 Ruven Pillay. All Rights Reserved. </div><!-- .site-info --> </footer><!-- #colophon --> </div><!-- col --> </div><!-- .row --> </div><!-- .container(-fluid) --> </div><!-- #wrapper-footer --> </div><!-- #page --> <script src='https://iipimage.sourceforge.io/wp-content/themes/understrap/js/theme.min.js?ver=1.2.2.1680034962' id='understrap-scripts-js'></script> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-26445856-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </body> </html><!-- hyper cache 2024-11-26 17:25:29 -->