×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    10

    Clear drawings on image

    Hi all

    I load a picture like this:

    im1 = Image.open(path)

    And draw a line on it like this:

    imgdraw = im1._draw
    imgdraw.line([(0,0), (20,20)], outline=blue, width=3)


    But how do I delete the line again? I had tried to make a copy of the 'im1' with:

    im1_org = copy.copy(im1)

    And when I wan't to delete the line, then copy the 'im1_org' to the 'im1', but it doesn't seems to work. Can anyone tell me how to do it?

    Best regard
    Ahrensberg

  2. #2
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    151

    Re: Clear drawings on image

    Why not create a new image (graphics.Image.new) and set it to equal the original image? Then you'd have a copy of the original before you add lines/graphics to it.

  3. #3
    Registered User
    Join Date
    May 2008
    Posts
    10

    Re: Clear drawings on image

    I've made the copy of my picture before i changes it with the method copy.copy(pict), but it doesn't seems to work. How should I do?

  4. #4
    Registered User
    Join Date
    May 2008
    Posts
    10

    Re: Clear drawings on image

    Finaly! I'm using the blit method to make a copy and later on using blit again for copy back.

Similar Threads

  1. --- ???save image problem??? ---
    By ferenn in forum Mobile Java Media (Graphics & Sounds)
    Replies: 6
    Last Post: 2007-10-01, 14:33
  2. Opening a JPEG Image
    By ummarbhutta in forum Mobile Java Media (Graphics & Sounds)
    Replies: 8
    Last Post: 2007-02-15, 06:34
  3. how to cut some part of Image
    By mshouab in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2006-08-04, 09:05
  4. HELP: Mutable Image to Immutable Image?
    By rj_cybersilver in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2005-03-26, 09:58
  5. Nokia Image Converter
    By davidpurdie in forum General Development Questions
    Replies: 0
    Last Post: 2004-02-18, 15:31

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×