首页 > 系统服务 > 详细

处理图片大小的linux命令

时间:2015-06-17 18:27:56      阅读:176      评论:0      收藏:0      [点我收藏+]

identify - describes the format and characteristics of one or more image files.

[root@test test-image]# identify b.jpg
b.jpg JPEG 1024x683 1024x683+0+0 8-bit DirectClass 641kb
[root@test test-image]#
[root@test test-image]#
[root@test test-image]# identify app-sun-biggest.jpg
app-sun-biggest.jpg JPEG 5184x3456 5184x3456+0+0 8-bit DirectClass 15.54mb
[root@test test-image]#
[root@test test-image]# identify b.jpg
b.jpg JPEG 1024x683 1024x683+0+0 8-bit DirectClass 641kb
[root@test test-image]#
[root@test test-image]#

convert - convert between image formats as well as resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more.

[root@test test-image]# /usr/bin/convert -resize 518x345 app-sun-biggest.jpg b.jpg        
[root@test test-image]# sz b.jpg
rz
 zmodem trl+C ?  100%     185 KB  185 KB/s 00:00:01       0 Errors

[root@test test-image]#
[root@test test-image]#
[root@test test-image]# ls -lht
总用量 17M
-rw-r--r--. 1 root root 186K 11月 27 18:55 b.jpg
-rw-r--r--. 1 root root 170K 11月 27 18:35 a.jpg
-rwxr-xr-x. 1 root root  248 11月 27 17:49 convert_img.sh
-rw-r--r--. 1 root root 546K 11月 27 17:40 test-image.jpg
-rw-r--r--. 1 root root  16M 11月 24 16:21 app-sun-biggest.jpg
[root@test test-image]#

处理图片大小的linux命令

原文:http://xingyun.blog.51cto.com/1310891/1662796

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!