百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
T

Tiny

> 编程语言
开源

an image compression framework.(一个高保真、高压缩比的图片压缩框架)

2.6K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

an image compression framework.(一个高保真、高压缩比的图片压缩框架)

Tiny

一个图片压缩框架。


或

压缩效果

图片信息 Tiny 微信
6.66MB (3500x2156) 151KB (1280x788) 135KB (1280x788)
4.28MB (4160x3120) 219KB (1280x960) 195KB (1280x960)
2.60MB (4032x3024) 193KB (1280x960) 173KB (1280x960)
372KB (500x500) 38.67KB (500x500) 34.05KB (500x500)
236KB (960x1280) 127KB (960x1280) 118KB (960x1280)

介绍

Tiny 不依赖任何库,在架构上保持代码简洁。Tiny 还使用异步线程池来压缩图片,并在压缩完成后在主线程中返回结果。

使用方法

安装

implementation 'com.zxy.android:tiny:1.1.0'

选择一个 ABI

Tiny 提供 abi:armeabi、armeabi-v7a、arm64-v8a、x86。 选择您需要的 "abi" 版本:

android {
    defaultConfig {
        ndk {
            abiFilters 'armeabi','x86'//or armeabi-v7a、arm64-v8a、x86
        }
    }
}

初始化

        Tiny.getInstance().init(this);

压缩

AsBitmap

抱歉,我无法翻译“``` Tiny.BitmapCompressOptions options = new Tiny.BitmapCompressOptions(); //options.height = xxx;//some compression configuration. Tiny.getInstance().source("").asBitmap().withOptions(options).compress(new BitmapCallback() { @Override public void callback(boolean isSuccess, Bitmap bitmap, Throwable t) { //return the compressed bitmap object } });

    //or sync compress.
    BitmapResult result = Tiny.getInstance().source("").asBitmap().withOptions(options).compressSync();
#### **AsFile**
I am ready to translate your text from English to Simplified Chinese. Please provide the content you'd like me to translate.
Tiny.FileCompressOptions options = new Tiny.FileCompressOptions();
Tiny.getInstance().source("").asFile().withOptio

[  ](https://bintray.com/sunzxyong/maven/Tiny/_latestVersion)[]() []()
[Blog entry with introduction](http://zhengxiaoyong.com/2017/04/23/Android%E5%9B%BE%E7%89%87%E5%8E%8B%E7%BC%A9%E6%A1%86%E6%9E%B6-Tiny/)
[Introduction of compression](http://zhengxiaoyong.com/2017/04/23/%E4%B9%9F%E8%B0%88%E5%9B%BE%E7%89%87%E5%8E%8B%E7%BC%A9/)

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Cbitmap-optimizationcompressfile-compressionimage-compression

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言