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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:25:29+00:00 2026-05-26T08:25:29+00:00

I am Using the Function to Mearge the Two Bitmap File on One Another

  • 0

I am Using the Function to Mearge the Two Bitmap File on One Another and it also overlay.
I am using this Function to Overlay it on OneAnother.

public static Bitmap combineImages(Bitmap cameraImage, Bitmap visionImage) { // can add a 3rd parameter 'String loc' if you want to save the new image - left some code to do that at the bottom 

     Bitmap finalImage = null; 
        int width, height = 0; 
          width = cameraImage.getWidth(); 
          height = cameraImage.getHeight(); 

        finalImage = Bitmap.createBitmap(width, height, cameraImage.getConfig()); 

        Canvas canvas = new Canvas(finalImage); 

        canvas.drawBitmap(cameraImage, new Matrix(), null);
        canvas.drawBitmap(visionImage, new Matrix(), null);

        // this is an extra bit I added, just incase you want to save the new image somewhere and then return the location 
        /*String tmpImg = String.valueOf(System.currentTimeMillis()) + ".png"; 

        OutputStream os = null; 
        try { 
          os = new FileOutputStream(loc + tmpImg); 
          finalImage.compress(CompressFormat.PNG, 100, os); 
        } catch(IOException e) { 
          Log.e("combineImages", "problem combining images", e); 
        }*/ 

        return finalImage; 
      } 

But After saving this Image I show that images to be combine with each other. it is not overlay. I want it to be Overlay on One Another.

Please tell me where i am wrong in this Function ??
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-05-26T08:25:29+00:00Added an answer on May 26, 2026 at 8:25 am

    this is the function to overlay two bitmap,s

    private Bitmap overlayMark(Bitmap bmp1, Bitmap bmp2)    { 
        int bh = originalBitmap.getHeight();
        int bw = originalBitmap.getWidth();
        Bitmap bmOverlay = Bitmap.createBitmap(bw,bh,Bitmap.Config.ARGB_8888); 
        Canvas canvas = new Canvas(bmOverlay); 
        canvas.drawBitmap(bmp1, 0, 0, null);
        canvas.drawBitmap(bmp2, 0,0, null);
        return bmOverlay;
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been using this function but I'd like to know what's the most efficient
I'm trying to merge array of JSON objects to one object using jQuery.extend function.
Right now I am using the zip method to merge two parallel arrays; one
I'm using jQuery $.when function to synchronize two $.getJSON asynchronous calls I have. Merging
The problem I have is I have two seperate AJAX requests using jQuery, One
What are the steps to estimating using function points? Is there a quick-reference guide
I want to make some C++ program and I'm using function popen here to
I've got an empty DIV element in which I append images by using function
I have a question regarding use of FFT. Using function getBand(int i) with Minim
When using the function imagepng() in PHP, how can I make sure the images

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.