我尝试使用imagemagick 6.5.6的转换来从文件大小和几何中创建原始JPEG文件的较小版本。我使用的命令是:
convert tj/p1.jpg -resize 500x tj/456c2e75fe0faa57fd1cfd87117e0963/p1.jpg
结果很有趣,原版是164kb的1102x1542 + 0 + 0,转换的是174kb的500x700 + 0 + 0。像素数几乎是原始版本的20%,文件大小要大得多。所以我添加-strip选项来删除JPEG配置文件中的所有详细信息。
convert tj/p1.jpg -strip -resize 500x tj/500_p1.jpg
500_p1.jpg在173kb时为500x700 + 0 + 0,仅减少1kb。
我也尝试使用-thumbnail。
convert tj/p1.jpg -thumbnail 500x tj/th/p1.jpg
翻译的jpeg也是173kb的500x700 + 0 + 0。
最后我发现-quality可以帮助减少图像。但75%的质量需要107kb,25%的质量只需50kb,可见的细节损失。但原始品质因素尚不清楚。
有没有人有类似的问题?以下是通过识别生成的图像配置文件。我发现主要差异如下:
Geometry: 1102x1542->500x700 print size: 11x15->5x7 Units: Undefined->PixelsPerInch Quality: unknown->92 Nr. of Pixels: 1.621mb->342kb
个人资料详情:
原件:
Image: tj/p1.jpg Format: JPEG (Joint Photographic Experts Group JFIF format) Class: DirectClass Geometry: 1102x1542+0+0 Resolution: 100x100 Print size: 11.02x15.42 Units: Undefined Type: TrueColor Endianess: Undefined Colorspace: RGB Depth: 8-bit Channel depth: red: 8-bit green: 8-bit blue: 8-bit Channel statistics: red: min: 0 (0) max: 255 (1) mean: 218.106 (0.855319) standard deviation: 52.7336 (0.206798) kurtosis: 5.04278 skewness: -2.24455 green: min: 0 (0) max: 255 (1) mean: 158.476 (0.621473) standard deviation: 92.9844 (0.364645) kurtosis: -1.24112 skewness: -0.535292 blue: min: 0 (0) max: 255 (1) mean: 113.282 (0.444244) standard deviation: 99.7003 (0.390981) kurtosis: -1.59582 skewness: 0.278377 Image statistics: Overall: min: 0 (0) max: 255 (1) mean: 122.466 (0.480259) standard deviation: 108.274 (0.424604) kurtosis: -1.78198 skewness: 0.0115088 Rendering intent: Undefined Interlace: None Background color: white Border color: rgb(223,223,223) Matte color: grey74 Transparent color: black Page geometry: 1102x1542+0+0 Dispose: Undefined Iterations: 0 Compression: JPEG Orientation: Undefined Properties: date:create: 2010-10-22T08:35:35+08:00 date:modify: 2010-09-30T10:52:06+08:00 jpeg:colorspace: 2 jpeg:sampling-factor: 2x2,1x1,1x1 signature: cdbd3f63986f0a7c4cd20aedcf9123d91df97e0cb7388f59059b4676fd36d481 Profiles: Profile-APP12: 15 bytes Artifacts: verbose: true Tainted: False Filesize: 164kb Number pixels: 1.621mb Pixels per second: 20.51mb User time: 0.078u Elapsed time: 0:01 Version: ImageMagick 6.5.6-5 2009-09-25 Q16 OpenMP http://www.imagemagick.org
转换:
Image: tj/456c2e75fe0faa57fd1cfd87117e0963/p1.jpg Format: JPEG (Joint Photographic Experts Group JFIF format) Class: DirectClass Geometry: 500x700+0+0 Resolution: 100x100 Print size: 5x7 Units: PixelsPerInch Type: TrueColor Endianess: Undefined Colorspace: RGB Depth: 8-bit Channel depth: red: 8-bit green: 8-bit blue: 8-bit Channel statistics: red: min: 0 (0) max: 255 (1) mean: 216.75 (0.849999) standard deviation: 50.1075 (0.1965) kurtosis: 4.066 skewness: -2.03195 green: min: 0 (0) max: 255 (1) mean: 158.316 (0.620846) standard deviation: 89.1433 (0.349582) kurtosis: -1.17694 skewness: -0.52022 blue: min: 0 (0) max: 255 (1) mean: 113.58 (0.445411) standard deviation: 96.3298 (0.377764) kurtosis: -1.53577 skewness: 0.287937 Image statistics: Overall: min: 0 (0) max: 255 (1) mean: 122.161 (0.479064) standard deviation: 106.052 (0.415889) kurtosis: -1.7498 skewness: 0.00808184 Rendering intent: Undefined Interlace: None Background color: white Border color: rgb(223,223,223) Matte color: grey74 Transparent color: black Page geometry: 500x700+0+0 Dispose: Undefined Iterations: 0 Compression: JPEG Quality: 92 Orientation: Undefined Properties: date:create: 2010-10-22T10:27:18+08:00 date:modify: 2010-10-22T10:31:08+08:00 jpeg:colorspace: 2 jpeg:sampling-factor: 2x2,1x1,1x1 signature: 63202ddf9106d3374fe3a396f5105ce8099051cf807ceb2ab5a19532957cec10 Artifacts: verbose: true Tainted: False Filesize: 174kb Number pixels: 342kb Version: ImageMagick 6.5.6-5 2009-09-25 Q16 OpenMP http://www.imagemagick.org