当前位置: 软件>java软件
Thumbor 的 Java 客户端 Pollexor
本文导语: Pollexor 是 Thumbor 图片服务的 JAVA 客户端,兼容 Android 平台。Maven: com.squareup pollexor 2.0.2 Gradle:compile 'com.squareup:pollexor:2.0.2'示例// Without encryption:Thumbor thumbor = Thumbor.create("http://example.com/"); // With encryption:Thumbor thum...
Pollexor 是 Thumbor 图片服务的 JAVA 客户端,兼容 Android 平台。
Maven:
com.squareup pollexor 2.0.2
Gradle:
compile 'com.squareup:pollexor:2.0.2'示例
// Without encryption:Thumbor thumbor = Thumbor.create("http://example.com/");
// With encryption:Thumbor thumbor = Thumbor.create("http://example.com/", "key");thumbor.buildImage("http://example.com/image.png")
.resize(48, 48)
.toUrl()// Produces: /unsafe/48x48/example.com/image.pngthumbor.buildImage("http://example.com/image.png")
.crop(10, 10, 90, 90)
.resize(40, 40)
.smart()
.toUrl()// Produces: /unsafe/10x10:90x90/smart/40x40/example.com/image.pngthumbor.buildImage("http://example.com/image.png")
.crop(5, 5, 195, 195)
.resize(95, 95)
.align(BOTTOM, RIGHT)
.toUrl()// Produces: /unsafe/5x5:195x195/right/bottom/95x95/example.com/image.pngthumbor.buildImage("http://example.com/background.png")
.resize(200, 100)
.filter(
roundCorner(10),
watermark(thumbor.buildImage("http://example.com/overlay1.png").resize(200, 100)),
watermark(thumbor.buildImage("http://example.com/overlay2.png").resize(50, 50), 75, 25),
quality(85)
)
.toUrl()// Produces: /unsafe/200x100/filters:round_corner(10,255,255,255):watermark(/unsafe/200x100/example.c您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。