Comments (11)
你怎么算的
from hxphotopicker.
就是后面那段代码, 选完资源回调, 使用 PhotoAsset的 fileSize求和算的, 我看到你库里面有写1000_1000 = 1MB的, 而我使用 求和的值/1000_100 才和 选图时勾选原图后边那个计算总大小相近; 不知道是不是哪里出了问题
func updateLayout(_ assetMetas: [PhotoAsset]) {
let totalFileSize = assetMetas.reduce(0) { partialResult, aMeta in
return partialResult + aMeta.fileSize
}/1000_100
}
from hxphotopicker.
你看你计算方式有没有问题吧
from hxphotopicker.
计算应该没有问题, 就是拿的fileSize求和;
确认下, fileSize 在勾选或者不勾选原图时, 它的返回数值没有变?
from hxphotopicker.
没有
from hxphotopicker.
不都是90吗
from hxphotopicker.
不都是90吗
因为我除的不是 1000_1000 呀
from hxphotopicker.
返回的是字节 肯定要除啊
/1000 = 1Kb
/1000000 = 1Mb
from hxphotopicker.
返回的是字节 肯定要除啊 /1000 = 1Kb /1000000 = 1Mb
所以如果除1000000, 结果就差了10倍了
from hxphotopicker.
from hxphotopicker.
1
from hxphotopicker.
Related Issues (20)
- 照片存储api
- 这样可以防止重名,config.textManager不能修改文案 HOT 2
- 获取当前PhotoAsset所在的相册 HOT 1
- 4.1.7版本的Crash
- 新增 apple 隐私政策文件,pod install 后 source_files 缺少 PrivacyInfo.xcprivacy 文件 HOT 1
- 相册拍照后存储位置
- 4.2.0 选择视频后报错及多语言有问题 HOT 2
- 4.2.0 Call Button Capture Photo/Video HOT 8
- Missing an expected key: 'NSPrivacyCollectedDataTypes' HOT 2
- 相册预览网络图拿不到size HOT 3
- 编辑图片闪退
- 点击图片预览时,无法修改预览页顶部导航栏的背景色 HOT 1
- 当相机设置方向是 .landscapeRight的时候,进入到相机相机排除来的画面是横向是竖的
- 当包含编辑器,Editor库时,在iOS 16.1 系统版本下,启动闪退 HOT 2
- 你好,有一个问题:双击放大后,滑动至下一张图片,再滑动回来,此时图片已恢复初始大小,再双击,图片会缩小 HOT 1
- NSInternalInconsistencyException崩溃 HOT 1
- <unknown>:0: error: circular reference
- 阿语环境下使用PhotoBrowser浏览图片有问题 HOT 3
- 代码功能建议 HOT 3
- 使用OC调用Swift获取照片与视频耗时太长了,能否优化呢? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hxphotopicker.