LuckSiege / LuckSiege/PictureSelector

compress库的Luban类图片压缩的size不满足设定的最大值

Open
#2,767 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
13.6k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

Description

## Current use version?
#### 当前使用的版本是多少?

```
3.11.1
```

## Will this problem occur in demo?
#### Demo能否复现这问题?

```
可以
```

## Describe the problem or provide an error log?
#### 描述问题或提供错误log?

```
选择图片后,压缩图片的size与设定最大值不符合。
在compress库里,用Luban类的ignoreBy方法设置图片最大的size,出来的图片是大于这个设定值的。
如下图代码所示,只进行了一次判断,然后压缩,压缩后并没有进行再次判断,
很容易出现压缩后的图片依然大于设定值,希望大哥可以优化一下这里
```
image

Contributor guide

No contributing guide indexed for this repository

Research direction

Start from the compress library's Luban class and its ignoreBy method, then reproduce the reported case in the demo with a configured maximum size. Trace the compression flow and verify that the resulting image is no larger than the requested maximum; add or update coverage if the existing project tests cover this behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.