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 - Display image on screen after picture

Display image on screen after picture

All your problems with Audio, Video and Images.

Display image on screen after picture

Postby paddypower » Fri Mar 26, 2010 7:55 pm

Greets -

I've pasted all code below, but the problem bit is as follows
Code: Select all
            Bitmap bm = BitmapFactory.decodeByteArray(data, 0, data.length);
            if(takenPicture != null) { takenPicture.recycle(); }
            takenPicture = bm;
            imageView.setImageBitmap(takenPicture);

What I'm tryint to do is display the image just taken for a user to say keep or take again. Right now I'm trying to show the image up in an imageview which presents two problems

1) The image shows up in the image view horizontally (Yikes!)
2) Always running out of memory.

Would appreciate any help in resolving either problem!
Code: Select all
[syntax="java"]   Camera.PictureCallback photoCallback = new Camera.PictureCallback() {
      
      public void onPictureTaken(byte[] data, Camera camera) {
         // TODO Auto-generated method stub
         FileOutputStream fos;
         try
         {
            Bitmap bm = BitmapFactory.decodeByteArray(data, 0, data.length);
            if(takenPicture != null) { takenPicture.recycle(); }
            takenPicture = bm;
            imageView.setImageBitmap(takenPicture);
            
            String fileUrl = MediaStore.Images.Media.insertImage(getContentResolver(), bm, "Camera Image", "Context Cam");
            if(fileUrl == null)
            {
               Log.d("Still", "Image Insert Failed");
               return;
            } else
            {
               Uri picUri = Uri.parse(fileUrl);
               sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, picUri));
            }
         }
         catch(Exception e)
         {
            Log.d("PicturePerfect", "Error Picture: ", e);
         }
         camera.startPreview();
         
      }
   };[syntax="java"]
paddypower
Freshman
Freshman
 
Posts: 2
Joined: Mon Nov 30, 2009 2:52 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 3 guests