When you use BitmapFactory to decode your pngs you are supposed to
supply options.
One of those options is a Bitmap.Config value, you probably are using
a low bit input, you want to use Bitmap.Config.ARGB_8888 to ensure you
get a full spectrum of color.
Here is a snippet
BitmapFactory.Options myOptions = new
BitmapFactory.Options();
myOptions.inDither = true;
myOptions.inScaled = false;
myOptions.inPreferredConfig = Bitmap.Config.ARGB_8888;
myOptions.inDither = false;
myOptions.inPurgeable = true;
preparedBitmap =
BitmapFactory.decodeResource(CTX.getResources(),
R.drawable.myImage, myOptions);
On Oct 29, 4:01 pm, Hatch <[email protected]> wrote:
> Seems my original post ("ugly pngs...") somehow disappeared :(
> nvm.
>
> I have a problem with a png resource that has gradient fade-out alpha.
>
> The png looks great in the emulator, but displays an artefact known as
> "color banding" (http://en.wikipedia.org/wiki/Colour_banding)
>
> Has anyone surpassed this issue ?
>
> My designer wants to trop a shadow behind his icons, and that's where
> the bands appear.
>
> What are my options ?
>
> Thanks
>
> Hatch
>
> BTW is there any way to see all my posts here on google groups ?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en