Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

压缩时设置 focusAlpha 参数未传入 #277

Closed
ghost opened this issue Jul 20, 2018 · 2 comments
Closed

压缩时设置 focusAlpha 参数未传入 #277

ghost opened this issue Jul 20, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Jul 20, 2018

在builder初始化时未把 focusAlpha 参数赋值:

 private Luban(Builder builder) {
    this.mTargetDir = builder.mTargetDir;
    this.mRenameListener = builder.mRenameListener;
    this.mStreamProviders = builder.mStreamProviders;
    this.mCompressListener = builder.mCompressListener;
    this.mLeastCompressSize = builder.mLeastCompressSize;
    this.mCompressionPredicate = builder.mCompressionPredicate;
    mHandler = new Handler(Looper.getMainLooper(), this);
  }

能否加入 如果是Png图片,自动设置focusAlpha参数为true,其它设置为false;

@Curzibn
Copy link
Owner

Curzibn commented Jul 20, 2018

保留alpha通道的情况下压缩的效率会很低下,只有在业务要求愿意牺牲压缩时间效率的情况下保留alpha通道再去设置focusAlpha参数。一般的业务都不会对透明通道过多要求的。

@Curzibn Curzibn closed this as completed Jul 20, 2018
@cjcj125125
Copy link

png压缩后alpha通道变黑色了,有办法把改为其他颜色吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants