mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 02:30:12 +02:00
208 lines
6.8 KiB
HTML
208 lines
6.8 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">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docute@4/dist/docute.min.css">
|
|
<link rel="author" href="/humans.txt" type="text/plain">
|
|
<link rel="preload" href="https://cdn.jsdelivr.net/gh/lovell/sharp@v0.25.3/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://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 src="https://cdn.jsdelivr.net/npm/docute-google-analytics@1/dist/index.min.js"></script>
|
|
<script>
|
|
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.3/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> |