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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T20:06:11+00:00 2026-05-30T20:06:11+00:00

I am working in a project where the images are drag able. In which

  • 0

I am working in a project where the images are drag able. In which if i put one image over the other image the image has to be changed.
What i need is
1) I want to check whether both the images are in same place or not.
2) The position of image must not be exact.It may be approximately equal

  • 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-30T20:06:12+00:00Added an answer on May 30, 2026 at 8:06 pm

    Here is an approach assuming the images are the same size

    // using ints because it is easier for taking the abs value
    int dx,dy;
    
    dx = frame1.origin.x - frame2.origin.x;
    dy = frame1.origin.y - frame2.origin.y;
    dx = abs(dx);
    dy = abs(dy);
    
    // overlapping width and height
    int ovHeight, ovWidth;
    
    ovWidth = frame1.size.width-dx;
    ovHeight = frame1.size.height-dy;
    
    int ovArea = ovWidth*ovHeight;
    int imageArea = frame1.width*frame1.height;
    
    int percentOverlap = ovArea*100/imageArea;
    
    if (percentOverlap > 80) {
      // do work here
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a project in which I need to analyze images; the
I'm working on a project which stores single images and text files in one
I am working on a image processing project, where I need to drag image
I am working on a project that utilizes a circular div laying over images
I m working on project user to move the image in one position to
I am working on blackberry project where i want to download image & save
I have been working on one project which is too complex and contain very
I'm working on this project, each page has a different background image for it.
I'm working on a project which is saving some images to sdcard and now
I am working in a project in which the postions of label and 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.