litesuits / litesuits/android-common
BitmapUtil.saveBitmap()方法的图片质量和大小问题
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
有一行压缩代码如下:
`
bitmap.compress(Bitmap.CompressFormat.PNG, 100, fos);
`
因为大部分图片还是JPG的,这样会导致本来不大的jpg图片保存到本地后变的很大(100k的jpg保存到本地可能变成1M),而且这个质量参数也不能调。
我觉得这个方法可以优化。
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating BitmapUtil.saveBitmap() and inspect the bitmap.compress call shown in the issue. Compare the output size and format behavior for JPG and PNG inputs, then define completion as saving images without the reported unexpected size increase while preserving configurable quality behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100