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. extending soft-keyboard with language switching support?

I am also very interested in quick language switching. At the very
least, it would be possible to make holding the search button down
switch languages as you suggest in 2). This would save a lot of time
switching languages, especially from Handcent, which seems to be slow
at loading the settings dialog, where the input language setting is.
That may even be something I could program myself, given an
introduction to programming for Android.

The other changes you would be really good, but I imagine they would
need to be hardcoded in the keyboard. Since the Sense keyboard has
such good prediction, I would be reluctant to switch to another, and I
doubt HTC will be quick to implement our suggestions. Maybe I'm
wrong...?



> 

2. Starting a Mapactivity from a normal activity

Hi,

I have a map app which works fine when its stand alone but it causes
an unexpected error when I try to add it as part of another app.

My current app which extends  Activity tries to launch the map
activity with the following lines of code

Intent m = new Intent(this, HomeSetter.class);
startActivity(m);

I also have the xml setup correctly

<activity android:name=".HomeSetter" android:label="Screen 4">

        </activity>
        <uses-library android:name="com.google.android.maps" />
        </application>

However when I try to launch it crashes everytime. I've tried
searching the net but I've had no joy in finding a solution

-- 

3. ApiDemos/Graphics/CamerPreview Nexus One force close

4. I want that Usb Support for Android Default Application

5. Apps not showing up in Droid Market

6. How to use emulateShiftHeld() Method???

7. Android browser - how to disable the green click animation