[mono-android] Image Banding
Tomasz Cielecki
tomasz at ostebaronen.dk
Thu Jun 28 09:00:07 UTC 2012
I recently ported a ColorPicker where I had a similar issue. I show
this ColorPicker which is a custom view in a Dialog. Inside this
Dialog, which is also a custom Dialog I simply wrote:
Window.SetFormat(Format.Rgba8888);
In the constructor, this helps me avoiding banding entirely.
On Wed, Jun 27, 2012 at 2:48 PM, Jean-Louis Kroon
<jeanlouiskroon at gmail.com> wrote:
> Hi everyone,
>
> Im having an issue with my backgrounds. I get horrible image banding when
> setting background images with gradients. When I set the background in my
> root layout I do it as follows;
>
> android:background="@drawable/GradientImage"
>
> I have also tried setting the background of my root layout in the code
> (after removing background from axml);
>
> Window.SetFormat(Android.Graphics.Format.Rgbx8888);
> Window.AddFlags(Android.Views.WindowManagerFlags.Dither);
>
> BitmapFactory.Options options = new BitmapFactory.Options();
> options.InPreferredConfig = Bitmap.Config.Argb8888;
> Bitmap gradient = BitmapFactory.DecodeResource(Resources,
>
> Resource.Drawable.Background_640,options);
> sv.SetBackgroundDrawable(new BitmapDrawable(gradient));
>
> This is done in OnCreate and unfortunately does not fix the issue,
>
> Has anyone ever came across this issue? Does anyone now how to fix this.
>
>
> --
> View this message in context: http://mono-for-android.1047100.n5.nabble.com/Image-Banding-tp5710604.html
> Sent from the Mono for Android mailing list archive at Nabble.com.
> _______________________________________________
> Monodroid mailing list
> Monodroid at lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
--
Med Venlig Hilsen / With Best Regards
Tomasz Cielecki
http://ostebaronen.dk
More information about the Monodroid
mailing list