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

  • Home
  • SEARCH
  • 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 8378425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:55:33+00:00 2026-06-09T15:55:33+00:00

I read about simple method to cropping bitmaps – it works fine, when crop

  • 0

I read about simple method to cropping bitmaps – it works fine, when crop is not so frequent:

Bitmap.createBitmap(src, x, y, width, height);

But in my app I’m drawing bitmaps on the canvas and I want it to not getting of bounds

Description

User can move and zoom bitmap. Now I’m using the method that I described above in onTouchEvent, but:

  1. It’s not smooth enough (however it works)

  2. It recreates a new bitmap at each “move” event. I think it’s extremely ineffective. There is no memory consumption, since I recycle previous bitmaps, but it’s still looks bad.

My question is: is there any way to crop bitmap more efficiently, while drawing on canvas?

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

    I’ve decided that it’s much better to use own ImageView for each Bitmap instead of drawing them together on one view.

    In this case OS will crop everything that getting out of bounds for you and there is no need to crop bitmaps by yourself. It’s significantly increases the performance.

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

Sidebar

Related Questions

I have read a lot about jquery and i have a simple webservice that
I am trying to build a simple shopping cart, i read about controlling them
Last night i have read about the curry() method in Groovy and i felt
I'm looking for a simple method to read a hex value from a text
I read about String Resources and I understood that you simply use the getString(...)
I read a couple of articles and sample code about how to solve TSP
Read about Server push here . I want to push data to client from
Read about the issue in this stackoverflow question . Still have the same issue
Ive read about it and to be honest it all seems like a bunch
I read about small talk being completely object oriented.. is C++ also completely 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.