LuckSiege / LuckSiege/PictureSelector
v2.7.3-rc09 压缩质量无法调整
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 13.6k
- Forks
- 3.1k
- PR merge metrics
- No merged PRs in 30d
Description
2M 1920*1080的图片压缩完后就剩6k 分辨率也只有100*80左右是什么问题
PictureSelector.create(context)
.openGallery(if (onlyPic) PictureMimeType.ofImage() else PictureMimeType.ofVideo())//筛选类型
.imageEngine(GlideEngine.createGlideEngine())//设置图片加载
// .isWeChatStyle(true)//开启R.style.picture_WeChat_style样式
.isEnableCrop(canCrop)//是否裁剪
.circleDimmedLayer(icCircle)// 是否开启圆形裁剪
.showCropFrame(!icCircle)// 是否显示裁剪矩形边框 圆形裁剪时建议设为false
.showCropGrid(!icCircle)//是否显示裁剪矩形网格 圆形裁剪时建议设为false
.setCircleDimmedColor(context.resources.getColor(R.color.black))//设置圆形裁剪背景色值
.setCircleDimmedBorderColor(context.resources.getColor(R.color.white))//设置圆形裁剪边框色值
// .isAndroidQTransform(true)
.isCompress(true)//是否开启压缩
// .compressQuality(90)//压缩质量
.compressSavePath(FileUtils.getCacheDirectory(context).absolutePath)//压缩图片保存地址
.rotateEnabled(false)//裁剪是否可旋转图片
.freeStyleCropMode(OverlayView.FREESTYLE_CROP_MODE_ENABLE)// 裁剪框拖动模式
.isCropDragSmoothToCenter(true)// 裁剪框拖动时图片自动跟随居中
.isDragFrame(true)//是否可拖动裁剪框(固定)
.minimumCompressSize(500)// 小于多少kb的图片不压缩
.synOrAsy(false)//开启同步or异步压缩
.maxSelectNum(maxNum)//最大选择数量,默认9张
.minSelectNum(1)// 最小选择数量
.cropImageWideHigh(width, height)// 裁剪宽高比,设置如果大于图片本身宽高则无效
.isMultipleSkipCrop(true)//多图裁剪是否支持跳过
.isWithVideoImage(false)//图片和视频是否可以同选,只在ofAll模式下有效
.isAutomaticTitleRecyclerTop(true)//图片列表超过一屏连续点击顶部标题栏快速回滚至顶部
.videoMaxSecond(60)// 查询多少秒以内的视频
.videoMinSecond(5)// 查询多少秒以上的视频
.maxVideoSelectNum(1)//视频最大选择数量
.setPictureWindowAnimationStyle(
PictureWindowAnimationStyle(R.anim.right_in_activity, R.anim.left_out_activity)
)//相册启动退出动画
.setPictureStyle(getUiStyle(context)).forResult(callback)
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 at the PictureSelector.create(context) entry point and trace how isCompress(true), minimumCompressSize(500), and cropImageWideHigh(width, height) affect the selected 1920×1080 image. Reproduce the reported 6k, roughly 100×80 output and identify the relevant compression or cropping path; done means the cause and expected behavior are documented or corrected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100