图片压缩开源imgscalr包

来源:互联网 发布:2017天猫魔盒必备软件 编辑:程序博客网 时间:2024/04/29 16:59

imgscalr包

Scalr.Method

AUTOMATIC 
          Used to indicate that the scaling implementation should decide which method to use in order to get the best looking scaled image in the least amount of time.
自动
用于表明缩放的实现应该决定使用以获得最佳的期待在最少的时间缩放图像的
BALANCED 
          Used to indicate that the scaling implementation should use a scaling operation balanced between SPEED and QUALITY.
平衡
用于表明缩放的实现应该使用缩放操作的速度和质量之间的平衡。
QUALITY 
          Used to indicate that the scaling implementation should do everything it can to create as nice of a result as possible.
质量
用于表明缩放的实现应该尽其所能创造很好的效果越好。
SPEED 
          Used to indicate that the scaling implementation should scale as fast as possible and return a result.
速度
用于表明缩放的实现的规模应该尽可能快并返回结果。
ULTRA_QUALITY 
          Used to indicate that the scaling implementation should go above and beyond the work done by QUALITY to make the image look exceptionally good at the cost of more processing time.
ultra_quality
用于表明缩放的实现应该超越的质量所做的工作,使图像看起来特别好的更多的处理时间成本。


Scalr.Mode
AUTOMATIC  
自动
用于表明缩放的实现应该计算所得的图像尺寸,通过查看图像的方向和发电比例尺寸,最佳为目标的宽度和高度,看到“给出更详细的scalr类描述图像的比例”。
BEST_FIT_BOTH
最佳模式
用于表明缩放的实现应该计算,适合在包围盒的最大尺寸的图片,没有种植或失真,保持原来的比例。
FIT_EXACT
精准模式
用适合的图像给不顾形象的比例精确的尺寸。
FIT_TO_HEIGHT
用于表明缩放的实现应该计算尺寸的图像,最适合在给定的高度,无论图像的方向。
FIT_TO_WIDTH
用于表明缩放的实现应该计算尺寸的图像,最适合在给定的宽度,无论图像的方向。
0 0