[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-1987":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":41,"readmeContent":42,"aiSummary":43,"trendingCount":16,"starSnapshotCount":16,"syncStatus":44,"lastSyncTime":45,"discoverSource":46},1987,"sharp","lovell\u002Fsharp","lovell","High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.","https:\u002F\u002Fsharp.pixelplumbing.com",null,"JavaScript",32321,1417,225,110,0,44,123,5,44.46,"Apache License 2.0",false,"main",[25,26,27,28,29,30,31,32,33,34,35,36,37,5,38,39,40],"avif","crop","exif","icc","image","image-processing","javascript","jpeg","libvips","nodejs","performance","png","resize","svg","tiff","webp","2026-06-12 02:00:35","# sharp\n\n\u003Cimg src=\"https:\u002F\u002Fsharp.pixelplumbing.com\u002Fsharp-logo.svg\" width=\"160\" height=\"160\" alt=\"sharp logo\" align=\"right\">\n\nThe typical use case for this high speed Node-API module\nis to convert large images in common formats to\nsmaller, web-friendly JPEG, PNG, WebP, GIF and AVIF images of varying dimensions.\n\nIt can be used with all JavaScript runtimes\nthat provide support for Node-API v9, including\nNode.js (^18.17.0 or >= 20.3.0), Deno and Bun.\n\nResizing an image is typically 4x-5x faster than using the\nquickest ImageMagick and GraphicsMagick settings\ndue to its use of [libvips](https:\u002F\u002Fgithub.com\u002Flibvips\u002Flibvips).\n\nColour spaces, embedded ICC profiles and alpha transparency channels are all handled correctly.\nLanczos resampling ensures quality is not sacrificed for speed.\n\nAs well as image resizing, operations such as\nrotation, extraction, compositing and gamma correction are available.\n\nMost modern macOS, Windows and Linux systems\ndo not require any additional install or runtime dependencies.\n\n## Documentation\n\nVisit [sharp.pixelplumbing.com](https:\u002F\u002Fsharp.pixelplumbing.com\u002F) for complete\n[installation instructions](https:\u002F\u002Fsharp.pixelplumbing.com\u002Finstall),\n[API documentation](https:\u002F\u002Fsharp.pixelplumbing.com\u002Fapi-constructor),\n[benchmark tests](https:\u002F\u002Fsharp.pixelplumbing.com\u002Fperformance) and\n[changelog](https:\u002F\u002Fsharp.pixelplumbing.com\u002Fchangelog).\n\n## Examples\n\n```sh\nnpm install sharp\n```\n\n```javascript\nconst sharp = require('sharp');\n```\n\n### Callback\n\n```javascript\nsharp(inputBuffer)\n  .resize(320, 240)\n  .toFile('output.webp', (err, info) => { ... });\n```\n\n### Promise\n\n```javascript\nsharp('input.jpg')\n  .rotate()\n  .resize(200)\n  .jpeg({ mozjpeg: true })\n  .toBuffer()\n  .then( data => { ... })\n  .catch( err => { ... });\n```\n\n### Async\u002Fawait\n\n```javascript\nconst semiTransparentRedPng = await sharp({\n  create: {\n    width: 48,\n    height: 48,\n    channels: 4,\n    background: { r: 255, g: 0, b: 0, alpha: 0.5 }\n  }\n})\n  .png()\n  .toBuffer();\n```\n\n### Stream\n\n```javascript\nconst roundedCorners = Buffer.from(\n  '\u003Csvg>\u003Crect x=\"0\" y=\"0\" width=\"200\" height=\"200\" rx=\"50\" ry=\"50\"\u002F>\u003C\u002Fsvg>'\n);\n\nconst roundedCornerResizer =\n  sharp()\n    .resize(200, 200)\n    .composite([{\n      input: roundedCorners,\n      blend: 'dest-in'\n    }])\n    .png();\n\nreadableStream\n  .pipe(roundedCornerResizer)\n  .pipe(writableStream);\n```\n\n## Contributing\n\nA [guide for contributors](https:\u002F\u002Fgithub.com\u002Flovell\u002Fsharp\u002Fblob\u002Fmain\u002F.github\u002FCONTRIBUTING.md)\ncovers reporting bugs, requesting features and submitting code changes.\n\n## Licensing\n\nCopyright 2013 Lovell Fuller and others.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n[https:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0](https:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0)\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","sharp 是一个高性能的 Node.js 图像处理模块，主要用于快速调整 JPEG、PNG、WebP、AVIF 和 TIFF 格式图像的大小。该项目的核心功能包括图像缩放、旋转、裁剪、合成和色彩空间转换等，其性能远超 ImageMagick 和 GraphicsMagick，速度可达后者的4-5倍，这得益于它使用了 libvips 库。sharp 支持所有提供 Node-API v9 的 JavaScript 运行环境，如 Node.js（^18.17.0 或 >= 20.3.0）、Deno 和 Bun。在大多数现代 macOS、Windows 和 Linux 系统上无需额外安装依赖即可运行。适用于需要高效处理大量图片的应用场景，比如网站或应用中的图片预处理服务。",2,"2026-06-11 02:47:14","top_all"]