避免像COM pression一些3G网络网络、COM、pression

2023-09-06 06:22:07 作者:盼回

我想从'网下载图像,并将其设置为用户的背景。此通过Wi-Fi的伟大工程,以及一些3G网络,但其他人(T-Mobile英国公司,肯定)似乎融为一体preSS图像发送之前。

I want to download an image from the 'net and set it as the users background. This works great over wi-fi, and some 3G networks, but others (T-Mobile UK, for sure) seem to compress the images before sending them.

此效果使用的浏览器时,也是引人注目 - 但是,如果在图像上你长preSS并保存,观看在画廊当它要么不玉米pressed在所有,或基本上更少所以。我希望能够做到这一点在我自己的应用程序。

This effect is noticeable when using the browser, too - however, if you long press on an image and save it, when viewing in the gallery it is either not compressed at all, or substantially less so. I want to be able to do this in my own app.

我认为它是与HTTP头,但我已经修改了的人的,没有作出了区别。

I assume it has something to do with the HTTP headers, but of the ones I've modified, none has made a difference.

谁能帮助我在这里?

类似的问题href=\"http://stackoverflow.com/questions/2183808/android-bitmapfactory-de$c$cbytearray-gives-pixelated-bitmap\">http://stackoverflow.com/questions/2183808/android-bitmapfactory-de$c$cbytearray-gives-pixelated-bitmap但没有得到解决。

Similar question here http://stackoverflow.com/questions/2183808/android-bitmapfactory-decodebytearray-gives-pixelated-bitmap but is unresolved.

推荐答案

你试过设置无缓存头?这可能会在某些网络工作。

Have you tried setting a no-cache header? This may work on some networks.

您也可以尝试具有客户端请求的图像第二次,这也可能会跳过COM pression。

You can also try having the client request the image a second time, this also may skip the compression.