Hello Every One,
                         I am trying to click  image in my application and
send it to over server
in Bytes so please help coz i need Low resolution image and send it to
server in small bytes. but my current code click image and convert it in
bytes but the image size may be big.

I use this code

try
            {
                parameters.setPreviewSize(100, 100);
                parameters.setPictureFormat(PixelFormat.JPEG);
                parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_AUTO);
                parameters.setJpegQuality(75);
                mCamera.setParameters(parameters);
                mCamera.startPreview();
            }
            catch (Exception e) {
                parameters.setPreviewSize(100, 100);
                parameters.setPictureSize(20, 20);//parameters.setZoom(1);
/*Not in 1.6*/
                //parameters.setZoom(0); /*Not in 1.6*/
                parameters.setPictureFormat(PixelFormat.JPEG);

//parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_AUTO); /*Not in 1.6*/
                //parameters.setJpegQuality(100); /*Not in 1.6*/
                mCamera.setParameters(parameters);
                mCamera.startPreview();
            }

and for send Bytes use this code

try
            {
                PImgString = Base64.encodeToString(PImg, 1);
                Log.d("PImgString", PImgString);
            }
            catch (Exception e) {
                PImgString = new String(PImgString);
                Log.d("PImgString catch", PImgString);
            }

For Send Query String over my handler file which i create in .Net

    postParameters.add(new BasicNameValuePair("PImg", PImgString ));




-- 

Thanks and Regards,

Ankit Kasliwal
[email protected]
+91-9300-940-136

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
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

Reply via email to