[android-developers] Re: Image Capture

2012-07-31 Thread sham gowda
Dude can you mail me the source code to capture images and to store in SD 
card plz 

On Friday, 12 June 2009 20:11:17 UTC+5:30, hanged_man wrote:

 i've written a class to capture an image and save it to the SD card, 
 if you wish to take a look at it, PM me and id be more than willing to 
 send you the source code

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Image Capture

2012-07-31 Thread Raghav Sood

 Dude can you mail me the source code to capture images and to store in SD
 card plz


How much are you paying me?

Thanks

-- 
Raghav Sood
Please do not email private questions to me as I do not have time to answer
them. Instead, post them to public forums where others and I can answer and
benefit from them.
http://www.appaholics.in/ - Founder
http://www.apress.com/9781430239451 - Author
+91 81 303 77248

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Image Capture resolution on HTC EVO

2010-08-13 Thread cesar
hi! I have the same problem with a Legend.
Did you get full resolution at the end?
thanks!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Image Capture resolution on HTC EVO

2010-08-13 Thread duwei
Update: I can get full size image (8M pixel) after upgrading my HTC
EVO to newly released 2.2 OS.

On Aug 13, 6:37 am, cesar cesar...@hotmail.com wrote:
 hi! I have the same problem with a Legend.
 Did you get fullresolutionat the end?
 thanks!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Image Capture

2009-06-12 Thread hanged_man

i've written a class to capture an image and save it to the SD card,
if you wish to take a look at it, PM me and id be more than willing to
send you the source code
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Image Capture

2009-06-11 Thread Max Salley

What exception does it throw?

On Jun 11, 1:29 pm, Sharmila sharmcg...@gmail.com wrote:
 Hi everyone,
 this is the code that I have for camera preview and image capture.I am
 trying to do camera preview and as I press the space button I am
 trying to take picture and save it in the picture gallery of the
 Android development phone.
 The code compiles fine,but as I press the space button,it captures the
 image and throws an exception and closes the application...
 I have no idea how to fix this.I have looked in a lot of places but
 haven't found a way to solve my problem.
 I desperately need help...
 Thanks!
 Sharmila.

 /**
  * Copyright (c) 2007, Google Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the License);
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  *    http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
 software
  * distributed under the License is distributed on an AS IS BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 implied.
  * See the License for the specific language governing permissions
 and
  * limitations under the License.
  */

 package com.android.cameraapitest;

 import java.io.FileNotFoundException;
 import java.io.OutputStream;

 import android.app.Activity;
 import android.content.Intent;
 import android.graphics.Bitmap;
 import android.graphics.Canvas;
 import android.graphics.Paint;
 import android.graphics.PixelFormat;
 import android.graphics.Rect;
 import android.net.Uri;
 import android.os.Handler;
 import android.os.Message;
 import android.os.Bundle;
 import android.provider.MediaStore.Images;
 import android.provider.MediaStore.Video;
 import android.view.Menu;
 import android.view.MenuItem;
 import android.view.SurfaceHolder;
 import android.view.SurfaceView;
 import android.view.KeyEvent;
 import android.hardware.Camera;

 import android.text.Layout;
 import android.util.Log;

 public class CameraApiTest extends Activity implements
 SurfaceHolder.Callback
 {
     private static final String TAG = CameraApiTest;
     Camera mCamera;
     boolean mPreviewRunning = false;

     public void onCreate(Bundle icicle)
     {
         super.onCreate(icicle);

         Log.e(TAG, onCreate);

         getWindow().setFormat(PixelFormat.TRANSLUCENT);

         setContentView(R.layout.camera_api_test);
         mSurfaceView = (SurfaceView)findViewById(R.id.surface);

         mSurfaceHolder = mSurfaceView.getHolder();
         mSurfaceHolder.addCallback(this);
         mSurfaceHolder.setType
 (SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
     }

     public boolean onCreateOptionsMenu(android.view.Menu menu) {
         MenuItem item = menu.add(0, 0, 0, goto gallery);
         item.setOnMenuItemClickListener(new
 MenuItem.OnMenuItemClickListener() {
             public boolean onMenuItemClick(MenuItem item) {
                 Uri target = Uri.parse(content://media/external/
 images/media);
                 Intent intent = new Intent(Intent.ACTION_VIEW,
 target);
                 startActivity(intent);
                 return true;
             }
         });
         return true;
     }

     @Override
     protected void onRestoreInstanceState(Bundle savedInstanceState)
     {
         super.onRestoreInstanceState(savedInstanceState);
     }

     Camera.PictureCallback mPictureCallback = new
 Camera.PictureCallback() {
         public void onPictureTaken(byte[] data, Camera c) {
             Log.e(TAG, PICTURE CALLBACK: data.length =  +
 data.length);

             try {
                 Bitmap bm = Bitmap.createBitmap
 (mSurfaceHolder.getSurfaceFrame().width(),
                         mSurfaceHolder.getSurfaceFrame().height
 (),Bitmap.Config.RGB_565);
                 OutputStream f=openFileOutput
 (image.jpg,MODE_WORLD_READABLE);
                   Canvas cnv=mSurfaceHolder.lockCanvas();
                   cnv.setBitmap(bm);
                   bm.compress(Bitmap.CompressFormat.JPEG,100,f);
                   mSurfaceHolder.unlockCanvasAndPost(cnv);
                         } catch (FileNotFoundException e) {
                                 // TODO Auto-generated catch block
                                 e.printStackTrace();
                         }

             mCamera.startPreview();
         }
     };

     public boolean onKeyDown(int keyCode, KeyEvent event)
     {
         if (keyCode == KeyEvent.KEYCODE_BACK) {
             return super.onKeyDown(keyCode, event);
         }

         if (keyCode == KeyEvent.KEYCODE_SPACE) {
             mCamera.takePicture(null,null,mPictureCallback);
             return true;
         }

         return false;
     }

     protected void onResume()
     {
         Log.e(TAG, onResume);
         super.onResume();
     }

     protected void onSaveInstanceState(Bundle outState)
     {
         super.onSaveInstanceState(outState);
     }

     protected void 

[android-developers] Re: Image Capture

2009-06-11 Thread Sundog

On Jun 11, 2:37 pm, Max Salley msalley@gmail.com wrote:
 What exception does it throw?



Details, details! lol...


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Image Capture

2009-06-11 Thread Sharmila Chakraborty
It starts previewing,but as soon as I press the space key it says,Sorry
application is forced closed.Try again!

On Thu, Jun 11, 2009 at 4:44 PM, Sundog sunns...@gmail.com wrote:


 On Jun 11, 2:37 pm, Max Salley msalley@gmail.com wrote:
  What exception does it throw?
 


 Details, details! lol...


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Image Capture

2009-06-11 Thread Sundog

Hi, if you're using Eclipse, do you know about the LogCat window on
the Debug page? It will tell you what exception is being thrown, which
is really essential to know to solve your problem.

On Jun 11, 3:12 pm, Sharmila Chakraborty sharmcg...@gmail.com wrote:
 It starts previewing,but as soon as I press the space key it says,Sorry
 application is forced closed.Try again!



 On Thu, Jun 11, 2009 at 4:44 PM, Sundog sunns...@gmail.com wrote:

  On Jun 11, 2:37 pm, Max Salley msalley@gmail.com wrote:
   What exception does it throw?

  Details, details! lol...- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Image Capture

2009-06-11 Thread jia liu
I am not sure that will help. I think when you implement mCamera.takePicture
did you try to give it a ShutterCallback like:

Camera.ShutterCallback mShutterCallback = new Camera.ShutterCallback() {
public void onShutter() {
// implement your onshutter actions or leave it blank

}
};

then:

   if (keyCode == KeyEvent.KEYCODE_SPACE) {
   mCamera.takePicture(mShutterCallback,null,mPictureCallback);
   return true;
   }

Not sure it is right but it might be helpful. :)


On Fri, Jun 12, 2009 at 7:29 AM, Sundog sunns...@gmail.com wrote:


 Hi, if you're using Eclipse, do you know about the LogCat window on
 the Debug page? It will tell you what exception is being thrown, which
 is really essential to know to solve your problem.

 On Jun 11, 3:12 pm, Sharmila Chakraborty sharmcg...@gmail.com wrote:
  It starts previewing,but as soon as I press the space key it says,Sorry
  application is forced closed.Try again!
 
 
 
  On Thu, Jun 11, 2009 at 4:44 PM, Sundog sunns...@gmail.com wrote:
 
   On Jun 11, 2:37 pm, Max Salley msalley@gmail.com wrote:
What exception does it throw?
 
   Details, details! lol...- Hide quoted text -
 
  - Show quoted text -
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Image capture

2008-12-03 Thread Mark K


  You need to use the camera class in android.hardware, you can grab
the byte[] the camera captures by use of the camera callback methods.

M

On Dec 2, 2:52 pm, fala70 [EMAIL PROTECTED] wrote:
 Using :
 Intent intent = new Intent(android.media.action.IMAGE_CAPTURE);
 startActivityForResult(intent, GET_IMAGE_FROM_CAMERA);

 is possibile to run the camera capture application, but I didn't
 understand how get the image file info or data on onActivityResult.

 somebody know how do it ?

 thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---