CSUMB 205 Multimedia in PYTHON
0.8.12
An easy-to-use wrapper module for the PIL module
|
Public Member Functions | |
def | __init__ (self, args) |
def | setRed (self, val) |
def | getRed (self) |
def | setGreen (self, val) |
def | getGreen (self) |
def | setBlue (self, val) |
def | getBlue (self) |
def | getX (self) |
def | getY (self) |
def | setColor (self, args) |
def | getColor (self) |
def | getCoord (self) |
def | cdist (self, kwargs) |
def | ldist (self, pixel) |
def | __str__ (self) |
def | __lt__ (self, other) |
def | __eq__ (self, other) |
def | __gt__ (self, other) |
def | __ne__ (self, other) |
def | __ge__ (self, other) |
def | __le__ (self, other) |
A simple class for accessing attributes of an RGB Pixel ATTRIBUTES: red An integer between 0 and 255. Accessible by getRed() and setRed() blue An integer between 0 and 255. Accessible by getBlue() and setBlue() green An integer between 0 and 255. Accessible by getGreen() and setGreen() X An integer, representing the pixel's location in a picture. Accesible with getX() Y An integer, representing the pixel's location in a picture. Accesible with getY()
Definition at line 33 of file simpleImage.py.
def simpleImage.rgbPixel.__init__ | ( | self, | |
args | |||
) |
Object initialization ARGS: self this Object (r,g,b) Tuple/List of pixel's color's R,G, and B values or r A pixel value for the Red aspect g A pixel value for the Green aspect b A pixel value for the Blue aspect (x,y) Tuple/List of the pixel's X and Y coordinate or x The X-part of the this pixel's location within the picture y The Y-part of the this pixel's location within the picture
Definition at line 60 of file simpleImage.py.
def simpleImage.rgbPixel.__eq__ | ( | self, | |
other | |||
) |
Equal comparison, based on average pixel value
Definition at line 355 of file simpleImage.py.
def simpleImage.rgbPixel.__lt__ | ( | self, | |
other | |||
) |
Less than comparison, based on average pixel value
Definition at line 348 of file simpleImage.py.
def simpleImage.rgbPixel.__str__ | ( | self | ) |
Returns a string representation of this object
Definition at line 338 of file simpleImage.py.
def simpleImage.rgbPixel.cdist | ( | self, | |
kwargs | |||
) |
Gets the color distance between this pixel and a specified color or pixel object ARGS: color tuple, 3 integer values where 0<=x<=255 pixel an rgbPixel object RETURNS: A Float, that is this pixel's color's distance to the given rgbPixel or color tuple. A negative number means that this pixel will likely be lighter, while a positive number means that this pixel will likely be darker
Definition at line 290 of file simpleImage.py.
def simpleImage.rgbPixel.getBlue | ( | self | ) |
Gets the BLUE value of the picture
Definition at line 186 of file simpleImage.py.
def simpleImage.rgbPixel.getColor | ( | self | ) |
Gets all 3 RGB values of this picture as a tuple
Definition at line 234 of file simpleImage.py.
def simpleImage.rgbPixel.getCoord | ( | self | ) |
Gets the X and Y coordinate of this pixel as a tuple
Definition at line 264 of file simpleImage.py.
def simpleImage.rgbPixel.getGreen | ( | self | ) |
Gets the GREEN value of the picture
Definition at line 178 of file simpleImage.py.
def simpleImage.rgbPixel.getRed | ( | self | ) |
Gets the RED value of the picture
Definition at line 170 of file simpleImage.py.
def simpleImage.rgbPixel.getX | ( | self | ) |
Gets the X-coordinate of this pixel in the picture
Definition at line 194 of file simpleImage.py.
def simpleImage.rgbPixel.getY | ( | self | ) |
Gets the Y-coordinate of this pixel in the picture
Definition at line 201 of file simpleImage.py.
def simpleImage.rgbPixel.ldist | ( | self, | |
pixel | |||
) |
Returns the length distance between two rgbPixels according to their X and Y values.
Definition at line 319 of file simpleImage.py.
def simpleImage.rgbPixel.setBlue | ( | self, | |
val | |||
) |
Sets the BLUE values to given number
Definition at line 183 of file simpleImage.py.
def simpleImage.rgbPixel.setColor | ( | self, | |
args | |||
) |
Sets this pixel's R,G, and B values to the given values ARGS: (R,G,B) Tuple/List of three integers or R Integer value, the red value of the color G Integer value, the green value of the color B Integer value, the blue value of the color
Definition at line 206 of file simpleImage.py.
def simpleImage.rgbPixel.setGreen | ( | self, | |
val | |||
) |
Sets the GREEN values to given number
Definition at line 175 of file simpleImage.py.
def simpleImage.rgbPixel.setRed | ( | self, | |
val | |||
) |
Sets the RED values to given number
Definition at line 167 of file simpleImage.py.