You Are Here:

Community: Developer Discussion Boards

#1 Old Clear drawings on image - 2008-05-10, 17:45

Join Date: May 2008
Posts: 10
kenneth@hrensberg.dk
Offline
Registered User
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
Reply With Quote

#2 Old Re: Clear drawings on image - 2008-05-10, 20:23

Join Date: Mar 2008
Posts: 127
jtullis
Offline
Regular Contributor
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.
Reply With Quote

#3 Old Re: Clear drawings on image - 2008-05-10, 20:28

Join Date: May 2008
Posts: 10
kenneth@hrensberg.dk
Offline
Registered User
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?
Reply With Quote

#4 Old Re: Clear drawings on image - 2008-05-10, 21:25

Join Date: May 2008
Posts: 10
kenneth@hrensberg.dk
Offline
Registered User
Finaly! I'm using the blit method to make a copy and later on using blit again for copy back.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
--- ???save image problem??? --- ferenn Mobile Java Media (Graphics & Sounds) 6 2007-10-01 15:33
Opening a JPEG Image ummarbhutta Mobile Java Media (Graphics & Sounds) 8 2007-02-15 07:34
how to cut some part of Image mshouab Mobile Java Media (Graphics & Sounds) 2 2006-08-04 10:05
HELP: Mutable Image to Immutable Image? rj_cybersilver Mobile Java Media (Graphics & Sounds) 1 2005-03-26 10:58
Nokia Image Converter davidpurdie General Discussion 0 2004-02-18 16:31

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia