Home > @taiyuuki/utils > image_resize
image_resize() function 
此函数根据指定的选项调整 HTML 图像元素的大小,并将调整后的图像作为新的 HTML 图像元素返回。
Signature:
typescript
declare function image_resize(img: HTMLImageElement, options: ImageOptions): HTMLImageElement;declare function image_resize(img: HTMLImageElement, options: ImageOptions): HTMLImageElement;Parameters 
| Parameter | Type | Description | 
|---|---|---|
| img | HTMLImageElement | 表示要调整大小的图像的 HTMLImageElement 对象。 | 
| options | ImageOptions | ImageOptions 是包含调整图像的大小、质量、类型的选项的对象。 | 
Returns:
HTMLImageElement
已根据提供的选项调整大小的新 HTMLImageElement。