iPhone减少大图片加载时间
任何人都知道如何首先加载大图像使其成为模糊图像,然后慢慢加载完整尺寸的图像。这至少可以让用户首先预览图像,而不必等待几秒钟来加载全尺寸图像。
谢谢
Anybody know how to load the large image to become a blur image first and then only slowly load the full size of image. This will at least let the user to preview the image first other than waiting for a few second to load the full size image.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您必须准备两张图像,一张用于模糊图像,一张用于全尺寸图像。对于带有 EXIF 的 JPEG 图像,它内部包含一个缩略图。因此数码相机在浏览时会显示缩略图。
You have to prepare two images, one is for blur image, and one is for the full size of image. As for the JPEG image with EXIF, it contains a thumbnail image inside. So the digital camera will show the thumbnail images when browsing.
不知怎的,我记得在图像处理课上,教授告诉我们,当浏览网页时,服务器会向你的浏览器发送一个模糊图像A和另一个图像B,当你获得这两个图像后,你的计算机将对A和B进行图像计算产生一个中间图像 C,并对 A 和 C 进行计算,产生另一个图像......这个过程持续几次以获得原始图像。这就是为什么您首先看到图像模糊的原因。理论上,该过程会线性减小图像尺寸。
Somehow I remember in Image processing class, professor told us that when browsing the web, the server would send your browser a blur image A, and another image B, after you getting both, your computer will be doing image computation on A&B to produce an intermediate image C and do computation on A&C produce another image...this procedure goes on for a couple times to get the original image. That's why you are seeing blurred image at the first place. This procedure theoretically reduce image size linearly.