sharp/docs/index.html
2020-06-12 14:17:23 +01:00

209 lines
8.6 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Resize large images in common formats to smaller, web-friendly JPEG, PNG and WebP images of varying dimensions">
<link rel="icon" type="image/png" href="https://pixel.plumbing/px/32x32/sharp-logo.svg">
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="https://pixel.plumbing/px/152x152/sharp-logo.svg">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="https://pixel.plumbing/px/144x144/sharp-logo.svg">
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="https://pixel.plumbing/px/120x120/sharp-logo.svg">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="https://pixel.plumbing/px/114x114/sharp-logo.svg">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="https://pixel.plumbing/px/72x72/sharp-logo.svg">
<link rel="apple-touch-icon-precomposed" href="https://pixel.plumbing/px/57x57/sharp-logo.svg">
<style>/* https://cdn.jsdelivr.net/npm/docute@4/dist/docute.min.css */ body{margin:0;color:var(--text-color);background:var(--page-background);text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;font:16px/1.7 -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}*{box-sizing:border-box}a{color:var(--link-color);text-decoration:none}.page-content>:first-child{margin-top:0}.page-content.has-page-title>h2:first-child{margin-top:7rem}.page-content h2,.page-content h3{font-weight:300;line-height:1.2}.page-content h2{font-size:2rem;border-bottom:1px solid var(--border-color);margin-top:7rem;padding-bottom:5px}.page-content h3{font-size:1.7rem;margin:40px 0 30px}.page-content code{font-family:var(--code-font);font-size:90%;background:var(--inline-code-background);border-radius:4px;padding:3px 5px;color:var(--inline-code-color)}.page-content>ul{padding-left:20px;margin:1rem 0}.page-content img{max-width:100%}@-webkit-keyframes blink-data-v-4f620c69{to{opacity:.2}}@keyframes blink-data-v-4f620c69{0%{opacity:.2}20%{opacity:1}to{opacity:.2}}</style>
<link rel="author" href="/humans.txt" type="text/plain">
<link rel="preload" href="https://cdn.jsdelivr.net/gh/lovell/sharp@v0.25.4/docs/README.md" as="fetch" type="text/markdown" crossorigin>
<link rel="preload" href="https://cdn.jsdelivr.net/gh/lovell/sharp@master/docs/image/sharp-logo.svg" as="image" type="image/svg+xml" crossorigin>
<link rel="dns-prefetch" href="https://pixel.plumbing">
<link rel="dns-prefetch" href="https://www.google-analytics.com">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "sharp",
"description": "High performance Node.js image processing",
"url": "https://sharp.pixelplumbing.com",
"codeRepository": "https://github.com/lovell/sharp",
"programmingLanguage": ["JavaScript", "C++"],
"runtimePlatform": "Node.js",
"copyrightHolder": {
"@context": "https://schema.org",
"@type": "Person",
"name": "Lovell Fuller"
},
"copyrightYear": [2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020],
"license": "https://www.apache.org/licenses/LICENSE-2.0"
}
</script>
<style>
:root {
--link-color: #077;
}
@media (max-width: 576px) {
.shorten-strapline {
display: none;
}
}
img[alt='sharp logo'] {
margin: 0 0 16px 16px;
}
.page-content > h2,
.page-content.has-page-title > h2:first-child {
margin-top: 3rem;
}
.page-content h3 {
font-size: 1.4rem;
}
ul ul {
padding-left: 20px;
}
</style>
<title>sharp - High performance Node.js image processing</title>
</head>
<body>
<div id="docute"></div>
<script src="https://cdn.jsdelivr.net/npm/docute@4/dist/docute.min.js"></script>
<script>
/* https://cdn.jsdelivr.net/npm/docute-google-analytics@1/dist/index.min.js */ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e=e||self).docuteGoogleAnalytics=n()}(this,function(){"use strict";function e(e){var n;window.ga||((n=document.createElement("script")).async=!0,n.src="https://www.google-analytics.com/analytics.js",document.body.appendChild(n),window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=Number(new Date),ga("create",e,"auto"))}function n(n,t){e(t),ga("set","page",n),ga("send","pageview")}return function(e){return{name:"@google-analytics",extend:function(t){!function(e,t){"function"==typeof e?e(function(e){n(e,t)}):e.afterEach(function(e){n(e.fullPath,t)})}(t.router,e)}}}});
const docuteApiTitlePlugin = {
name: 'apiTitle',
extend(api) {
api.processMarkdown(function (md) {
const title = api.store.getters.sidebarLinks
.filter(function (sidebarLink) {
return sidebarLink.link === api.router.history.current.path
})
.map(function (sidebarLink) {
return sidebarLink.title;
})[0];
return title
? md.replace(/<!-- Generated by documentation.js. Update this documentation by updating the source code. -->/, '# ' + title)
: md;
});
}
};
const docuteApiSearchPlugin = {
name: 'apiSearch',
extend(api) {
api.enableSearch({
handler: function (keyword) {
if (keyword.trim().length > 2) {
return fetch('/search-index.json')
.then(function (res) {
return res.json();
})
.then(function (entries) {
const results = [];
entries.forEach(function (entry) {
if (entry.k.includes(keyword)) {
results.push({
title: entry.t,
link: entry.l,
description: entry.d,
label: entry.l.startsWith("/api") ? "API" : "Install"
});
}
})
return results.slice(0, 3);
})
} else {
return [];
}
}
});
}
};
new Docute({
router: { mode: 'history' },
logo: '<div style="display:flex;align-items:center">'
+ '<strong>sharp</strong> '
+ '<img src="https://pixel.plumbing/px/16x16/sharp-logo.svg" style="padding:8px" alt="#"> '
+ '<span style="opacity:0.8;white-space:pre" class="shorten-strapline">High performance </span> '
+ '<span style="opacity:0.8">Node.js image processing</span> '
+ '</div>',
darkThemeToggler: true,
detectSystemDarkTheme: true,
footer: '<a href="https://pixelplumbing.com/" target="_blank">pixelplumbing.com<a>',
plugins: [
docuteGoogleAnalytics('UA-13034748-12'),
docuteApiTitlePlugin,
docuteApiSearchPlugin
],
sourcePath: 'https://cdn.jsdelivr.net/gh/lovell/sharp@v0.25.4/docs',
nav: [
{
title: 'Funding',
link: 'https://opencollective.com/libvips'
},
{
title: 'GitHub',
link: 'https://github.com/lovell/sharp'
}
],
sidebar: [
{
title: 'Home',
link: '/'
},
{
title: 'Installation',
link: '/install'
},
{
title: 'API',
children: [
{
title: 'Constructor',
link: '/api-constructor'
},
{
title: 'Input metadata',
link: '/api-input'
},
{
title: 'Output options',
link: '/api-output'
},
{
title: 'Resizing images',
link: '/api-resize'
},
{
title: 'Compositing images',
link: '/api-composite'
},
{
title: 'Image operations',
link: '/api-operation'
},
{
title: 'Colour manipulation',
link: '/api-colour'
},
{
title: 'Channel manipulation',
link: '/api-channel'
},
{
title: 'Global properties',
link: '/api-utility'
},
],
},
{
title: 'Performance',
link: '/performance'
},
{
title: 'Changelog',
link: '/changelog'
}
]
});
</script>
</body>
</html>