|
getBlue - use in jython to replace PIL?: msg#00022lang.jython.user
Hello everyone, Earlier, I used PIL in python to go through an image and "getpixel" - getting the r, g, b, and alpha for pixel (x,y). (Actually for a whole line of (x,y)'s, but nevermind that). The pixels in question are all shades of grey, so r==g==b, and I only need one of these numbers for each pixel. So I'm looking through the image documentation for J2PSE, and saw java's "getBlue" method under the ColorModel class. It says that it "Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB." Again, getting only the blue value would be just fine for my current purposes, since r==g==b. But of course, since this documentation site is for java itself (and not jython), it tells me all kinds of information I know nothing about (public, private, etc), and doesnt tell me what I'd *most* like to see: an example. Does anyone have/know the location of a *simple* example/explanation of how this method could be used in jython to determine the blue value of a particular image? I'm pretty new to the language, but like I said I completely figured out how to do this in python/PIL earlier today, I'm just trying to transfer it over (since I can't use PIL in jython). Any ideas/pointers would be appreciated! Thanks, Denise ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_ids93&alloc_id281&op=click
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Jython Demo Applets, Prakash |
|---|---|
| Next by Date: | Re: getBlue - use in jython to replace PIL?, Jeff Emanuel |
| Previous by Thread: | Jython Demo Applets, Prakash |
| Next by Thread: | Re: getBlue - use in jython to replace PIL?, Jeff Emanuel |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |