You Are Here:

Community: Developer Discussion Boards

#1 Old How to get color value from pixels - 2008-10-27, 14:46

Join Date: Sep 2007
Posts: 8
cman
Offline
Registered User
I want to get pixels from image for calculate image
processing. someone help me How to used API/module? I am new for python developer. Thank you so much
Reply With Quote

#2 Old Re: How to get color value from pixels - 2008-10-27, 14:54

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Online
Forum Nokia Champion
You can get the RGB values for a pixel with the Image.getpixel((x,y)) function. For example:
Code:
from graphics import *

#Load the image
i=Image.open("C:\\picture.jpg")
#Get its red, green and blue values
print i.getpixel((20,30))
#Will return a tuple, like (0,8,23)
Reply With Quote

#3 Old Re: How to get color value from pixels - 2008-10-27, 17:20

Join Date: Sep 2007
Posts: 8
cman
Offline
Registered User
Thank you very much for your answer. code is work very good.and Thank again
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
Nokia N-Series Complete Model Line-Up Dopod General Discussion 6 2008-07-22 21:16
PNGs with semi-transparent pixels ehudshapira Mobile Java Media (Graphics & Sounds) 0 2007-12-29 23:50
Dead pixels, anyone? alternateve Symbian User Interface 0 2004-03-07 03:27
pixels arrays ivanodin Mobile Java Media (Graphics & Sounds) 1 2003-11-27 08:18
getPixels() returns pixels for wrong Graphicsobject kyhlis Mobile Java Media (Graphics & Sounds) 1 2003-04-29 15:07

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