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
,
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
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
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
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
= 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
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
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
8 matches
Mail list logo