Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - black screen on G1 when displaying a bitmap to a canvas

black screen on G1 when displaying a bitmap to a canvas

Put your problem here if it does not fit any of the other categories.

black screen on G1 when displaying a bitmap to a canvas

Postby androiduser123 » Sat May 16, 2009 7:27 am

I need to display a picture taken by camera on surfaceview.

I converted byte array to bitmap in method onPictureTaken(byte[] data, Camera camera) of Camera.PictureCallback.


Camera.PictureCallback cb = new Camera.PictureCallback() {
public void onPictureTaken(byte[] data, Camera camera) {

camera.startPreview();
Bitmap b= BitmapFactory.decodeByteArray(data, 0, data.length, null);

}
};

I then tried to draw this bitmap on a surfaceview
Canvas canvas = holder.lockCanvas();

Rect bounds=new Rect(0, 0, 320,240);
Paint paint = new Paint();
paint.setColor(0xFF0000FF);

canvas.drawBitmap(b, null, bounds, paint);

holder.unlockCanvasAndPost(canvas);

It is running well on emulator but when run on G1 device , it displays a black screen.

Please help me, if anyone knows the answer
androiduser123
Junior Developer
Junior Developer
 
Posts: 13
Joined: Tue May 12, 2009 7:20 am

Top

Postby androiduser123 » Sat May 16, 2009 12:08 pm

Please help..I m still not able to do it :(
androiduser123
Junior Developer
Junior Developer
 
Posts: 13
Joined: Tue May 12, 2009 7:20 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 14 guests