The Sandbox Thread

5 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Colour Filter

Back to Forum: The Sandbox
  • User profile image
    Angus

    I have just created this simple colour filter, it is still in its early stages, but I would appriciate any input into it as I would like to possibly encorparate the algorithm used here into another project. At the moment in the program you browse for an image then select a colour for it to filter out (it can only filter one colour at the moment so try to use block colours for the best effect) then you press 'Filter' and a second picture box shows the image with the area of colour that you wanted filtered out displayed as white. The program simply uses the .GetPixel in Bitmap and searches every pixel. If you have any suggestions as to another way of doing it please let me know as I am eager to make this application more effecient.

    Angus Higgins

  • User profile image
    NeoTOM
  • User profile image
    SvendTofte

    it must be immensely slow if it's using GetPixel. Rewrite to it is using pointers (assuming C# here)   

  • User profile image
    Angus

    I haven't added a dynamic resize to it so it isn't too slow, but that is one of the things I'm hoping to change, I want to make it more efficient, but my basic knowledge of c# doesn't allow me to do this.

    Angus Higgins

  • User profile image
    PeterH

    Out of interest: How would it work with pointers? It's just that I would do it in the way Angus here has done it. What are pointers and how would the code be implimented?

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.