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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:08:15+00:00 2026-05-13T18:08:15+00:00

I have three questions actually: Is it better to draw an image on a

  • 0

I have three questions actually:

  1. Is it better to draw an image on a bitmap or create a bitmap as resource and then draw it over a bitmap? Performance wise, which one is better?
  2. If I want to draw something transparent over a bitmap, how would I go about doing it?
  3. If I want to overlay one transparent bitmap over another, how would I do it?

Sorry for the long list, but in the interest of learning, I would like to explore both the approaches.

  • 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-13T18:08:16+00:00Added an answer on May 13, 2026 at 6:08 pm

    I can’t believe no one has answered this yet! A rare occurrence on SO!

    1

    The question doesn’t quite make sense to me. But I’ll give it a stab.
    If you’re asking about direct drawing to a canvas (polygons, shading, text etc…) vs. loading a bitmap and blitting it onto the canvas that would depend on the complexity of your drawing.
    As the drawing gets more complex the CPU time required will increase accordingly.
    However, blitting a bitmap onto a canvas will always be a constant time which is proportional to the size of the bitmap.

    2

    Without knowing what “something” is how can I show you how to do it?
    You should be able to figure out #2 from the answer for #3.

    3

    Assumptions:

    • bmp1 is larger than bmp2.
    • You want them both overlaid from the top left corner.

          private Bitmap overlay(Bitmap bmp1, Bitmap bmp2) {
              Bitmap bmOverlay = Bitmap.createBitmap(bmp1.getWidth(), bmp1.getHeight(), bmp1.getConfig());
              Canvas canvas = new Canvas(bmOverlay);
              canvas.drawBitmap(bmp1, new Matrix(), null);
              canvas.drawBitmap(bmp2, new Matrix(), null);
              return bmOverlay;
          }
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Actually I have two questions. (1) Is there any reduction in processing power or
There have been several questions over the past few days about the proper use
I have 3 questions pertaining to decimal arithmetic in Python, all 3 of which
I have a few questions regarding an init script I'm writing. I haven't actually
This post is actually divided in two questions: Which kinds of associations classes/interfaces usually
I have actually 3 questions, but similar to each other: I have a model
I have a general question about interpreters of functional languages: Are there actually any
I have a three part question based on a dataframe (df is example rows)
There have been questions with answers on how to write rubygems, but what should
As per the title I have three parts to this question... Is db4o object

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.