Thanks Dianne, that solved my png banding issue.

On Feb 23, 6:05 am, Dianne Hackborn <[email protected]> wrote:
> The canvas drawing into the live wallpaper is not 4444; the default is 565,
> which yes will result in banding.  You can change the desired format with
> the SurfaceHolder API.
>
> http://developer.android.com/reference/android/view/SurfaceHolder.htm...)
> <http://developer.android.com/reference/android/view/SurfaceHolder.htm...)>
> On Tue, Feb 22, 2011 at 6:48 AM, allandt bik-elliott (thefieldcomic.com) <
>
>
>
>
>
>
>
>
>
> [email protected]> wrote:
> > the problem afaik is that the bitmap used in the canvas is argb_4444 which
> > has quite a shallow pool of colours to choose from and to get a decent
> > gradient you need argb_8888 or a decent amount of dithering - neither of
> > which i'm achieving
>
> > best
> > a
>
> > On 14 February 2011 23:13, Mark <[email protected]> wrote:
>
> >> I am also experiencing this issue. The code I am using to apply a gradient
> >> is as follows...
>
> >> Canvas DestinationCanvas = new Canvas();
> >> DestinationCanvas.setBitmap(DestinationBitmap);
> >>  //Gradient is going from very transparent black to fully black at the
> >> bottom
> >> GradientDrawable grad = new GradientDrawable(Orientation.TOP_BOTTOM, new
> >> int[]{0x02000000, 0x2a000000, 0x5b000000, 0x90000000, 0xc9000000,
> >> 0xcc000000});
> >> grad.setBounds(0, 0, DestinationBitmap.getWidth(), RequiredHeight);
> >> grad.draw(DestinationCanvas);
>
> >> Calling grad.setDither(true) or setFilter(true) does not help.
>
> >> Regards,
> >> Mark England
>
> >> --
> >> 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
>
> >  --
> > 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
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

-- 
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

Reply via email to