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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:44:11+00:00 2026-06-18T08:44:11+00:00

I am using BufferedImage from Java in an Android project. In this project the

  • 0

I am using BufferedImage from Java in an Android project. In this project the user is allowed to select a small portion of an image.

For example: If you have an image of a park with a building. The user can make small selections of grass and the android program needs to save the coordinates of this selection.

I was wondering if there is functionality in BufferedImage that supports this: letting an user select small portions of the image (using touch screen) and getting coordinates from those locations in the image. If not, what else can I do?

  • 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-18T08:44:12+00:00Added an answer on June 18, 2026 at 8:44 am

    You can store the pixel position (x, y) (i.e. cursor position) of the click in to SQLite database and you don’t need to store all values around it. If you want to check a click which comes around this pixel (with a tolerance value), the following code will help you :

        int[] xyReceivedPixel = { 15, 20 };
        int[] xyOriginalPixel = { 30, 15 };
        int toleranceValue = 30;
    
        boolean status = (xyReceivedPixel[0] < xyOriginalPixel[0] + toleranceValue 
                || xyReceivedPixel[0] > xyOriginalPixel[0] - toleranceValue)
                && (xyReceivedPixel[1] < xyOriginalPixel[1] + toleranceValue 
                        || xyReceivedPixel[1] > xyOriginalPixel[1] - toleranceValue);
    
        System.out.println(status);
    

    Here, xyOriginalPixel is the original pixel point which is stored in the database and the xyReceivedPixel is the pixel point that is got when another click was made or a pixel point that is to be compared with it. The xyReceivedPixel is checked whether it is near by xyOriginalPixel with the maximum difference of toleranceValue.

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

Sidebar

Related Questions

How can I read the metadata of a JPG image in Java using BufferedImage
I need to get the background image from a PowerPoint slide using java. I
I need to send image from android app to java app. Basically, I need
I need a method to select a rectangular region from an image (a BufferedImage
I am trying to create a transparent PNG image from a BufferedImage in Java.
I have a problem regarding an actual project using Java, Kinect (OpenNI) and Processing.
I resized an image using Java2D Graphics class. But it doesn't look right. BufferedImage
I've been searching on how to scan a QRCode from BufferedImage in Java without
I'm trying to create image from SQLite database in Java Swing application. But it
I am using an Applet to save image from clipboard. The image is saved

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.