use-smartcrop:将smartcrop.js的钩子React到具有兴趣点和面部识别的内容感知图像裁剪

使用智能作物这是+的React Hook版本,支持Typescript。我们为制作了这个钩子,使开发人员能够创建内容感知营销和社交图像,但它对任何类型的项目都很有用。用法安装这个依赖: yarn add use-smartcrop默认情况下,图像使用crossOrigin=""道具加载。 。常见案例用法: import React from "react" ; import { useSmartcrop , SmartcropStatus } from "use-smartcrop" ; function App ( ) { const src = "https://images.pexels.com/photos/1496286/pexels-photo-1496286.jpeg" ; // Width and height are requir
zip 文件大小:463.68KB