cutter:在Golang中裁剪图像

时间:2021-05-16 14:56:37
【文件属性】:
文件名称:cutter:在Golang中裁剪图像
文件大小:1.07MB
文件格式:ZIP
更新时间:2021-05-16 14:56:37
Go 刀具 Go库可裁剪图像。 Cutter最初是为了能够使用github.com/nfnt/resize调整图像大小而开发的。 用法 阅读上的文档 导入包 import "github.com/oliamb/cutter" 裁纸刀提供裁切图像的功能。 默认情况下,将从左上角以给定的大小裁剪原始图像。 croppedImg , err := cutter . Crop ( img , cutter. Config { Width : 250 , Height : 500 , }) 在大多数情况下,裁剪后的图像将与原始图像共享一些内存,因此应以只读方式使用。 如果需要,必须明确要求提供副本。 croppedImg , err := cutter . Crop ( img , cutter. Config { Width : 250 , Height : 500
【文件预览】:
cutter-master
----.gitignore(261B)
----.travis.yml(42B)
----LICENSE(1KB)
----cutter.go(5KB)
----example_test.go(2KB)
----README.md(3KB)
----cutter_test.go(6KB)
----benchmark_test.go(1KB)
----cutter()
--------main.go(1KB)
----fixtures()
--------gopher.jpg(1.06MB)
--------dark.png(6KB)

网友评论