high quality image upscaling filter by Zenju
在包管理器中引入
npm i @d2-projects/xbrz
import xbrz from '@d2-projects/xbrz'
在浏览器中引入
<script src="https://cdn.jsdelivr.net/npm/@d2-projects/xbrz/dist/xbrz.js"></script>
使用
xbrz.scaleToCanvas({
source: './source.png',
canvas: document.querySelector('#canvas'),
scale: 6
})