| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
jopen
11年前发布

快速调整图片大小:T-REZ

一个超级快的图片大小调整Go库,构建opencv 和 jpeg-turbo 之上。
这个包能够保持图片品质,虽然专注于速度。它会剔除图片元信息如IPTC, EXIF, ColorSync profile等。

特性

当前支持:

  • fit resize algo
  • fill resize algo
  • background color
  • gravity in case of fit
  • quality of jpeg (default 95)

基准测试

On:

Architecture:          x86_64  CPU op-mode(s):        32-bit, 64-bit  Byte Order:            Little Endian  CPU(s):                24  On-line CPU(s) list:   0-23  Thread(s) per core:    2  Core(s) per socket:    6  Socket(s):             2  NUMA node(s):          2  Vendor ID:             GenuineIntel  CPU family:            6  Model:                 45  Stepping:              7  CPU MHz:               1895.270  BogoMIPS:              3790.86  Virtualization:        VT-x  L1d cache:             32K  L1i cache:             32K  L2 cache:              256K  L3 cache:              15360K  NUMA node0 CPU(s):     0-5,12-17  NUMA node1 CPU(s):     6-11,18-23

运行24个线程:

$ GOMAXPROCS=24 go run bench/main.go -file testdata/American_Dad.jpg -size 200x200 -workers 24    ## Resize speed of 14000 resizes    mean: 34.377864ms     min: 20.395457ms     max: 61.757311ms     %99: 55.475588ms  stdDev: 4.781191ms    rate: 700.16 ops (images resized per second)

 

项目主页:http://www.open-open.com/lib/view/home/1416982329768

 本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
 转载本站原创文章,请注明出处,并保留原始链接、图片水印。
 本站是一个以用户分享为主的开源技术平台,欢迎各类分享!
 本文地址:https://www.open-open.com/lib/view/open1416982329768.html
T-REZ 图形/图像处理