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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:52:34+00:00 2026-05-27T02:52:34+00:00

I have two images that are very similar. So for example suppose I drew

  • 0

I have two images that are very similar.

So for example suppose I drew a 200×200 square, went and filled it a wide variety of colors (say, rainbow colored fill), and saved the image.

Then I drew a star in the middle of the square and also filled it with some variety of colors that is different from the square, and saved it as a different file.

Then some days later I come back and I really want that star because it took some effort to make and didn’t want to redo it. I want to be able to crop out that star quickly and isolate it into its own image (because I was using paint which didn’t have layers)

But I know that image with the star is just a minor variation of the image without the star, so ideally if I could just compare the two images and remove the pixels around the star, then I can get my star back.

Is there anything that does this already?
Or some technique that is provided by existing tools that I am unaware of?

  • 1 1 Answer
  • 3 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-27T02:52:35+00:00Added an answer on May 27, 2026 at 2:52 am

    Assuming you have the original image, you can read both images into your program and look at each pixel to see if they are the same value, if they are then set them to black, if not, keep them as they are; your resultant image should have only the pixels that changed in it, with the rest being black.

    This may give you an issue within the “star” itself, as there are likely to be points in the star that are the same as the points on the original image(i.e. a pixel may be green in both places on both images). In this case you can look at the surrounding pixels to help.

    i.e.:

    Bitmap originalBMP = new Bitmap(Bitmap.FromFile("[File-Name-No-Star]"));
    Bitmap starBMP = new Bitmap(Bitmap.FromFile("[File-Name-With-Star]"));
    Bitmap finalBMP = new Bitmap(starBMP.Size.Width, starBMP.Size.Height);
    
    for( int row = 0; row < starBMP.Size.Width; row++)
    {
        for( int col = 0; col < starBMP.Size.Height; col++)
        {
            if (originalBMP.GetPixel(row, col).Equals(starBMP.GetPixel(row, col)))
            {
                finalBMP.SetPixel(row, col, Color.Black);
            }
            else
            {
                finalBMP.SetPixel(row, col, starBMP.GetPixel(row, col));
            }
        }
    
    }
    finalBMP.Save("[NEW-FILE-NAME]");
    

    This code doesn’t look at the issues with pixels in the star image that correspond to the same values in the same locations of the non-star image. There are several techniques to solve that, but bear in mind that if you are looking at neighboring pixels you may have issues at the boundaries of the star.

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

Sidebar

Related Questions

I have two very similar images (specifically, two screenshots) and I'm trying to find
Here's the situation: I have a two images that are over 1024 in width
We have two images with transparent sections that each have a map and separately
I have two images on a WPF window that are on top of each
I have two images. One that is normal, and another that is more colourised.
I have image Array with two images out of that first image its showing
Basically I have a database with two tables, that is, Updates table and Images
A have a struct with four very large matrices that correspond to grayscale images.
I have two images like so. (granted that the code is indented) @Html.Image(/Images/icons/arrow-up.gif, up)
I have two overlay images that I want show in camera view depending on

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.