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 8655461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:02:03+00:00 2026-06-12T15:02:03+00:00

I am facing difficulties in implementing a custom camera view. The task I want

  • 0

I am facing difficulties in implementing a custom camera view.

The task I want to achieve is –
in camera preview I got a preview picture (in previewcallback function).
I zoom it and then I want to draw the zoomed version of the image in the camera view.

In previewcallback function I got image pixel values as byte array. But in canvas.drawImage it accepts int array. Can anyone suggest me how does the pixel data is organized in the byte array within the previewcallback function?

I tried to lock the surfaceview but it didn’t help. It returns null so I cannot draw anything on that surface.

Any suggestions?
thanks.

  • 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-06-12T15:02:09+00:00Added an answer on June 12, 2026 at 3:02 pm

    As said previously, NV21 is default and has to be provided always – this means you can rely on it and you shal rely on it if you like to be compatible with other devices. As for locking surface view – surface view you are using for preview is off limits for you since it is already locked by camera applciation ( which is nativeand runs in own process ) – if you like to use it, you will have to stop preview on it so camera app releases this surface ( hopefully )

    Bad news is that you can not place another surface view on top of the first with frame layout
    ( this is limitation of surface views, they can not overlap ), but good news is that you can place image view oevr it and draw your bitmap there ( via runOnuiThread() )

    You can find example how to do this in our javaOCR project

    ( see android demos, please use git repo as it is current )

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

Sidebar

Related Questions

I'm facing a bit of difficulties implementing the HA for my ActiveMQ service. Right
iam facing problem in passing array to view. this is my controller code.. function
I am facing some difficulties figuring out what this function in the Apple tutorials
Iam facing problem in understanding and converting a matlab code into opencv. I want
Im facing the following problem: I want to integrate the mercurial hash into my
I am relatively new in Python so facing difficulties in basics. I have following
Facing a problem with JavaScript Date function, returns Date {Invalid Date} in Firefox browser
I am facing difficulties to make my own Eclipse Intro Page ( as shown
I am facing some difficulties while assigning the values in an array list. My
I am facing some difficulties in getting my progress bar to retrieve its progress

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.