Re: [android-developers] Re: PNG loading that doesn't premultiply alpha?

2012-09-02 Thread arberg
Hi, I think it would make sense that either Bitmap could be without premultiplied alpha, or GLUtils.texImage2D method could take as parameter whether to load with or without premultiplied alpha. Since you say Bitmaps will never be without premultiplied alpa, I suggest the latter, plus as you

[android-developers] Re: PNG loading that doesn't premultiply alpha?

2012-06-20 Thread arberg
, which hard-coded the alpha-premultiply in the correspondending method. Marcus On Thursday, 12 August 2010 14:09:54 UTC+2, arberg wrote: I just realized the Bitmap-class behaviour is screwed. If I use the following method for decoding the bitmap then I get alpha- premultiplied pixels when

[android-developers] Re: Change activity-wide density-configuration so that Resources decode from another res-folder.

2011-10-27 Thread arberg
maintaining custom density, sometimes reverting to original density. Alex On Oct 26, 11:02 pm, arberg arb...@gmail.com wrote: I would like tochangethe density configuration so that I can force a certain size. Specifically I want all 720p screens including xhigh- density phones AND large medium

[android-developers] Change activity-wide density-configuration so that Resources decode from another res-folder.

2011-10-26 Thread arberg
I would like to change the density configuration so that I can force a certain size. Specifically I want all 720p screens including xhigh- density phones AND large medium-density tablets to use the same bitmap, and to have the same text size relative to the screen resolution. The result will be

[android-developers] Re: PNG loading that doesn't premultiply alpha?

2010-08-12 Thread arberg
Apparently the cause of the premultiplied alpha lies in GLUtils, or perhaps the way GLUtils works with the Bitmap class. We can get the correct non-premultiplied alpha behaviour by replacing GLUtils.texImage2D with the opengl method gl.glTexImage2D which takes a pixel component array as a

[android-developers] Re: PNG loading that doesn't premultiply alpha?

2010-08-12 Thread arberg
= IntBuffer.wrap(pixels); gl.glTexImage2D(GL10.GL_TEXTURE_2D, 0, GL10.GL_RGBA, bitmap.getWidth(), bitmap.getHeight(), 0, GL10.GL_RGBA, GL10.GL_UNSIGNED_BYTE, pixelBuffer); } Alex On Aug 12, 10:17 am, arberg arb...@gmail.com wrote: Apparently the cause

[android-developers] Re: PNG loading that doesn't premultiply alpha?

2010-08-12 Thread arberg
is mentioned in the Android javadoc for Bitmap. Alex On Aug 12, 10:50 am, arberg arb...@gmail.com wrote: Regarding the big-endian comment in the code, I meant little-endian. If we use IntBuffer to write ABGR ints to ByteBuffer on a little- endian-phone we get byte order we RGBA. However the same code

[android-developers] Re: TableLayout set column width by using layout_weight

2010-02-01 Thread arberg
I believe I found a solution to your problem. The weight attribute of linearlayouts (http://d.android.com/reference/android/widget/ LinearLayout.LayoutParams.html) unfortunately only extends views, and therefore the your attempt does not work, because the textviews are to wide to begin with. I