Tuesday, June 29, 2010

[android-developers] Re: PNG quality in WebView based app

I experienced the same problem, but in my case I don't load the the
image remotely. I load the image locally from the sd card. The
original image is very clear and uncompressed. I tried different
formats as well (png, jpg).
The only solution I found was to divide the large image into multiple
tiles and put them back together via html, then load the html file
locally. That's the only way the images don't get blurry when zooming
in.

On May 11, 4:52 am, Yahel <kaye...@gmail.com> wrote:
> I ran into the same problem a few monthes back.
>
> I spent hours trying to figure out why a webview would degrade the
> quality of an image.
>
> Turns out it was not the webview, it was my provider : When browsing
> the web on gprs or edge my provider downgrades image quality on their
> server so that its a lot lighter to download on their network.
> When I tried over wifi everything came back to normal.
>
> In the end I implemented a regular binary file download from my
> server, and then displayed that image.
>
> Yahel
>
> On 10 mai, 22:20, Jeff <jeff.th...@gmail.com> wrote:
>
>
>
> > I am using WebView to display html content in an app. One of the pages
> > has a rather large PNG image. The image is large and detailed on
> > purpose because the idea is to use it as a map and allow users to zoom
> > in to see the detail.
>
> > Unfortunately, when the image is displayed with WebView, the quality
> > is horrific. I am assuming that WebView is attempting to do some image
> > optimization to reduce the size of the graphic.
>
> > Is there anyway to prevent it from doing this? I don't want the image
> > to lose any of its quality.
>
> > Thanks,
> > Jeff
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscribe@googlegroups.com
> > For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment