OneDrive-PNG文件大小错误 [英] OneDrive - Wrong size for PNG files

查看:114
本文介绍了OneDrive-PNG文件大小错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

上载某些PNG文件时,在OneDrive网站和REST API返回的Photo对象中错误地报告了大小.可以使用以下PNG文件重现该内容:

When uploading certain PNG files the size is incorrectly reported on the OneDrive website and in the Photo object returned by the REST API. This can be reproduced using the following PNG file:

http://www2.zippyshare.com/v/11270772/file.html

文件大小为 20.3 KB ,OneDrive将其显示为 38.4 KB

The file size is 20.3 KB, OneDrive displays it as 38.4 KB

这似乎仅在没有downsize_photo_uploads查询参数或将其设置为true时会缩小/转换大小的PNG文件中发生.但是问题不仅限于使用REST API上载.

It seems this only happens with PNG files that would be downsized/converted when the downsize_photo_uploads query param is absent or set to true. But the problem is not just limited to uploads using the REST API.

已经报告了该问题,推荐答案

Ryan.我们对此进行了调查,并对大小发生了什么问题有了很好的了解. OneDrive通过使用与文件关联的最大数据流的大小来计算文件在我们系统中所占的空间".将图像上传到OneDrive时,我们还会为图像创建缩略图,以便我们可以在客户和网站中快速显示各种视图.

Ryan from OneDrive here. We looked into this and have a good understanding of what's going wrong with the size. OneDrive computes the "space" a file takes up in our system by using the size of the largest data stream associated with a file. When an image is uploaded to OneDrive, we also create thumbnails for images so that we can quickly show various views in our clients and website.

对于此特定文件,我们为PNG文件创建的JPG缩略图之一实际上比原始文件大(由于JPG压缩对该图像的效果不如PNG有效).结果,缩略图实际上是文件上最大的流.您可以想象,这种情况很少发生,但是对于此图像(和其他类似图像),我们存在此错误.

In the case of this particular file, one of the JPG thumbnails we create for the PNG file is actually larger than the original file (due to the JPG compression not being as effective as PNG for this image). As a result, the thumbnail is actually the largest stream on the file. As you can imagine, that doesn't happen very often, but for this image (and others like it) we have this bug.

我们有一个跟踪该问题的错误,并正在研究如何修复API以返回默认"流的大小,该流表示文件的实际内容.我没有预计的ETA,但我们正在努力.

We have a bug tracking the issue and are investigating how we can fix the API to return the size of the "default" stream -- the stream that represents the actual contents of the file. I don't have an ETA for the fix, but we're working on it.

这篇关于OneDrive-PNG文件大小错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆