Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7065273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:56:11+00:00 2026-05-28T04:56:11+00:00

My issue captured image is looking blurry in my application where as the image

  • 0

My issue captured image is looking blurry in my application where as the image that is captured with the device camera component is looking good – something auto zoom effect is going once user click on capture button. can some one help me to achieve this scenario how and where should i apply.

here is the code:

public void surfaceChanged(SurfaceHolder holder, int format, int width,int height) {
    // Now that the size is known, set up the camera parameters and begin
    // the preview.
    Camera.Parameters parameters = camera.getParameters();
    Integer version = Integer.parseInt(Build.VERSION.SDK);
    if(version > Build.VERSION_CODES.ECLAIR_MR1)
    {
        Log.d(TAG, "------> version greater than eclari 2.1");
        List<Size> sizes = parameters.getSupportedPreviewSizes();
        Size optimalSize = getOptimalPreviewSize(sizes, width, height);
        parameters.setPreviewSize(optimalSize.width, optimalSize.height);
    }
    else
    {
        Log.d(TAG, "------> version less than eclari 2.1");
        parameters.setPreviewSize(ApplicationInitiator.screenW,ApplicationInitiator.screenH); 
    }

    List<String> focusModes = parameters.getSupportedFocusModes();
    if (focusModes.contains(Camera.Parameters.FOCUS_MODE_AUTO))
    {
        parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_AUTO);
    }

    parameters.setJpegQuality(100);
    camera.setParameters(parameters);
    camera.startPreview();
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T04:56:11+00:00Added an answer on May 28, 2026 at 4:56 am

    Well, on your text you talk about capturing a image, but I don’t see anything in your code about taking a picture, Anyway, if you want to obtain a focused photo, what you have to do is register a AutoFocusCallback to take a picture when focus is obtained:

    Camera.AutoFocusCallback mAutoFocusCallback = new Camera.AutoFocusCallback() {
        @Override
        public void onAutoFocus(boolean success, Camera camera) {
            camera.takePicture(null, null, mPictureCallbackRaw);
        }
    };
    
    Camera.PictureCallback mPictureCallbackRaw = new Camera.PictureCallback() {  
        public void onPictureTaken(byte[] data, Camera c) { 
            // (...)            
        }  
    };
    
    public void takeFocusedPicture() {
        mCamera.autoFocus(mAutoFocusCallback);
    }
    

    .

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing an application that needs to capture a barcode Image using Camera
I'm writing an application which will display the current image seen by a camera
I am using exifInterface for photo rotation issue code is below: Facing captured image
I am writing an Android application where I need to display Image Captured through
I ran into an issue with something that I am probably just overlooking. I
Issue for text elements that are adjacent to icon elements, the glyph height is
Issue is SOLVED: Problem is that it is a pre-compiled web page project and
Issue comes up when i try to unload plugin that is loaded and load
I am using phonegap in my application. using camera plugin for capture and select
I'm having an issue where I'm using the camera app to take a photo

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.