how did you do the pre-dithering? our designer created a host of
images with dithering enabled, but it didn't have any effect. The
artifacts would only disappear when setting setDither(true) on EVERY
SINGLE drawable having a gradient.

This seems like a major framework fail... 16Bit graphics? It's 2009,
I'd sort of expect better image rendering than that of Window 3.11.

On Oct 30, 3:55 am, Ian <iangm...@gmail.com> wrote:
> The pre-dithering of the images worked fine (I've had to download a
> dithering plugin to photoshop).
>
> On Oct 29, 3:52 pm, Ian Guedes Maia <iangm...@gmail.com> wrote:
>
> > Thanks. I've checked it and the optimization do not affect the colors
> > the way that is shown on the emulator/device. I've tried to define a
> > proxy XML for the PNG and set its dither to true, but it didn't
> > worked. I'll try to change the png image settings on photoshop or
> > something.
>
> > I've found some previous discussion on the subject, but nothing
> > conclusive i 
> > guess:http://osdir.com/ml/AndroidBeginners/2009-06/msg00017.html(I'lltry 
> > that)http://groups.google.com/group/android-developers/browse_thread/threa......
>
> > 2009/10/29 webmonkey <webmonke...@gmail.com>:
>
> > > To do a true comparison of what the PNG is like after 'optimization'
> > > take it out of the final APK, it is just a zip archive.
>
> > > The banding artifacts you see are because the device and the emulator
> > > are displaying in 16-bit 565 pixel format, they can't display all the
> > > colors. Have you tried painting the image with Paint.setDither(true)
> > > turned on:
>
> > >http://developer.android.com/reference/android/graphics/Paint.html#se...
>
> > > On Oct 28, 9:20 pm, Ian <iangm...@gmail.com> wrote:
> > >> Hi all,
>
> > >> I've noticed that the PNGs of my application with some gradients
> > >> effects looked terribly bad at the device (a Samsung Galaxy) and at
> > >> the emulator, and I've found the following note at the documentation
> > >> (http://developer.android.com/guide/topics/graphics/2d-
> > >> graphics.html):
>
> > >> "Note: Image resources placed in res/drawable/ may be automatically
> > >> optimized with lossless image compression by the aapt tool. For
> > >> example, a true-color PNG that does not require more than 256 colors
> > >> may be converted to an 8-bit PNG with a color palette. This will
> > >> result in an image of equal quality but which requires less memory. So
> > >> be aware that the image binaries placed in this directory can change
> > >> during the build. If you plan on reading an image as a bit stream in
> > >> order to convert it to a bitmap, put your images in the res/raw/
> > >> folder instead, where they will not be optimized."
>
> > >> I've tried the res/raw suggestion, but it didn't worked.
>
> > >> I've tried to use the image as JPEG as a workaround, but I couldn't
> > >> use 9-patch.
>
> > >> I've uploaded a comparison between the original png and the
> > >> "optimized" png that is shown on the emulator or 
> > >> devices:http://www.weka.com.br/temp/img/comparison.jpg
>
> > >> One workaround would be put the images at /assets/ and manually load
> > >> and set the image on the ImageViews, but it requires a lot of code
> > >> changes.
>
> > >> Any ideas? Is there any way to disable this optimization?
>
> > >> Thanks in advance,
> > >> Ian
>
>

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to