#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    3
    Rep Power
    0

    How do i fill up an area with a color of a picture?


    Hi.

    I wonder if python can fill up an area with a color of a picture?
    Let me show you what im mean. You se the "Fill-in tool" in MS paint? I wonder if i can program a code who fill in e.g Findland to red from white?

    If i have this picture and a change.py file. I run the change.py file and then open the picture and then Findland is gonna be red and not white. Is that possible in python?

    queenofnephron.com/wp-content/gallery/maps/worldmap925b.jpg
  2. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2005
    Posts
    610
    Rep Power
    65
    You could write a painting program similar to MS Paint with Python, but it would take more than an afternoon's time.
    Real Programmers always confuse Christmas and Halloween because Oct31 == Dec25
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    3
    Rep Power
    0
    Originally Posted by Dietrich
    You could write a painting program similar to MS Paint with Python, but it would take more than an afternoon's time.
    Yes. But do you recommend a import module or a package to start with?
  6. #4
  7. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,841
    Rep Power
    480
    You could work with tkinter, part of the standard python distribution. There are quite a few concepts to master.
    [code]Code tags[/code] are essential for python code and Makefiles!
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    3
    Rep Power
    0
    Here is wxBrush.

    But im not sure if there is a function who can fill up areas in there. Do you se one?

    wxpython.org/docs/api/wx.Brush-class.html

    informit.com/articles/article.aspx?p=405047&seqNum=2

    Here is som example but it's in C++

IMN logo majestic logo threadwatch logo seochat tools logo