-
Notifications
You must be signed in to change notification settings - Fork 46
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
标清图过度压缩 #96
Comments
是的。这里很有很大优化空间。当初设计是最快返回100k 和10k 的图片。若要适配任意大小需要涉及一些图片计算公式。
发自我的iPhone
… 在 2021年4月2日,10:44,李浪 ***@***.***> 写道:
(NSData *)lf_fastestCompressImageDataWithSize:(CGFloat)size imageSize:(NSUInteger)imageSize;
标清图
建议支持传入最大尺寸做初步压缩 或者 最大压缩次数防止消耗太大
/** 缩放图片 */
if (currentResolution > MIN_UPLOAD_RESOLUTION) {
float factor = sqrt(currentResolution / MIN_UPLOAD_RESOLUTION) * 2;
compressedImage = [self lf_scaleWithSize:CGSizeMake(self.size.width / factor, self.size.height / factor)];
}
percent *= (targetSize/imageLength);
这一步压缩过度 且 压缩后没有检测是否已经符合要求
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
请问如何解决标清图过渡压缩这个问题,大佬有给出解决办法么? 谢谢 |
选原图。然后在回调时自己压缩。
这个是 时间、准确率、内存消耗。很难找到都认同的平衡点。
发自我的iPhone
… 在 2021年4月29日,11:50,wuWeiFeng2 ***@***.***> 写道:
请问如何解决标清图过渡压缩这个问题,大佬有给出解决办法么? 谢谢
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
标清图
建议支持传入最大尺寸做初步压缩 或者 最大压缩次数防止消耗太大
这一步压缩过度 且 压缩后没有检测是否已经符合要求
The text was updated successfully, but these errors were encountered: