我嘗試在我的 create react 應用程式中使用
這是我的代碼
import sharp from 'sharp';
const buffer = await sharp(req.file.buffer)
.resize({ width: 250, height: 250 })
.extend({
top: 10,
bottom: 10,
left: 10,
right: 10,
background: '#d7d8de'
})
.png()
uj5u.com熱心網友回復:
不。
Sharp 使用 node.js 運行時以及安裝在主機系統上的二進制可執行代碼。所有這些都意味著 Sharp 無法在 Web 瀏覽器中運行。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/345377.html
標籤:javascript 节点.js 反应 图片 锋利的
