Compressor
Compressor copied to clipboard
压缩会经常出现损坏的情况
在pad端出现频率大
MainScope().launch { val resultList = mutableListOf<String>() paths.asFlow() .map { val compress = Compress.with(activity, File(it)) compress.setQuality(60).strategy(Strategies.compressor()).get(Dispatchers.IO).absolutePath }.flowOn(Dispatchers.IO) .catch { onPickListener?.onError() }.onCompletion { if (currentCoroutineContext().isActive) { onPickListener?.onSelected(resultList) } else { onPickListener?.onError() } }.collect { resultList.add(it) } }
所谓的破损具体是指什么呢?
透明背景的图片压缩完,背景变成了黑色
是不是压缩的参数存在问题?
我先关了这个 issue 了,如果还有问题,请提供复现的图片和代码片段