Getting RGB data from Android bitmap

by Naveen » Sat, 15 May 2010 17:04:36 GMT


Sponsored Links
 Hi!

I need help on couple of issues .... Basically I want to capture
webpage from webview and get raster data of the bitmap.

To do so what I did is
                WebView m_browser;
 Picture picture = m_browser.capturePicture();
        Bitmap  b = Bitmap.createBitmap( picture.getWidth(),
        picture.getHeight(), Bitmap.Config.ARGB_8888);
        Canvas c = new Canvas( b );
        picture.draw( c );

Issue 1: Out of memmory exception when web page is big for eg.  http://times.com 
What should I do to get this image? Is it possible to get image in
multiple bitmaps?

Issue 2: How can i get RGB data 24 bit data from ARGB_8888. I need to
get this 24 bit Raster data compress it with some compression and
process it...

Thanks in advance

--



Getting RGB data from Android bitmap

by Naveen » Mon, 17 May 2010 14:12:21 GMT


 Any help pls. on my query?



>


Sponsored Links


Getting RGB data from Android bitmap

by skink » Mon, 17 May 2010 15:26:18 GMT


 


if your image is too big create smaller one, for example two times
smaller:

  WebView browser;
  Picture p = browser.capturePicture();
  Bitmap b = Bitmap.createBitmap( p.getWidth() / 2, p.getHeight() /
2, Bitmap.Config.ARGB_8888);
    Canvas c = new Canvas(b);
    c.scale(0.5, 0.5);
    p.draw(c);

pskink

--



Other Threads

1. OpenGL ES 1.1 question (one more time...)

glColor4x() works fine. Use bit shifting, no need for floats or divisions, eg
for value=0xAARRGGBB:

int alpha  = (value >> 16) & 0xFF00;
int red    = (value >> 8) & 0xFF00;
int green  = value & 0xFF00;
int blue   = (value << 8) & 0xFF00;

gl.glColor4x(red, green, blue, alpha);

That should be faster.

Olivier





>> Philip

2. (WTA) google goggles application

As subject, saya bisa unduh dmn yh? Udah coba cari di market tp gk ada....

Tia

3. Ingat ! Tempat Gathering di Soho Music Cafe, Lantai 5 Senayan City

4. BroadcastReceiver never getting BOOT_COMPLETED intent

5. Remove window title after setting content

6. Canvas.cpp library

7. resolving equivalent intent filters