The Picture class and helper functions. This currently supports the following formats: JPEG, BMP, GIF, TIFF, IM, MSP, PNG, PCX, and PPM.
A Picture class as a wrapper for PIL’s Image class.
Draw a line of Color col and width width from (x1, y1) to (x2, y2) on this Picture.
Draw an empty oval of Color col, width w, and height h on this Picture. The upper left corner of the oval is at (x, y).
Draw a filled oval of Color col, width w, and height h on this Picture. The upper left corner of the oval is at (x, y).
Draw an empty polygon of Color col with corners for every vertex in list point_list on this Picture.
Note: point_list is a list containing vertices xy coordinates (ex. [x1,y1,x2,y2,x3,y3]) It should contain at least three coordinate pairs.
Draw a filled polygon of Color col with corners for every vertex in list point_list on this Picture.
Note: point_list is a list containing vertices xy coordinates (ex. [x1,y1,x2,y2,x3,y3]) It should contain at least three coordinate pairs.
Draw an empty rectangle of Color col, width w, and height h on this Picture. The upper left corner of the rectangle is at (x, y).
Draw a filled rectangle of Color col, width w, and height h on this Picture. The upper left corner of the rectangle is at (x, y).
Draw str s in Color col on this Picture starting at (x, y).
Draw str s in Color col and font font on this Picture starting at (x, y).
Close this Picture’s open PictureInspector window.
Close this Picture’s open PictureInspector window.
Return a deep copy of this Picture.
Crop Picture pic so that only pixels inside the rectangular region with upper-left coordinates (x1, y1) and lower-right coordinates (x2, y2) remain. The new upper-left coordinate is (0, 0).
Return this Picture’s filename.
Return how many pixels high this Picture is.
Return this Picture’s PIL Image object.
Return the Pixel at coordinates (x, y).
Return this Picture’s title.
Return how many pixels wide this Picture is.
Return True if (x, y) is a valid coordinate for this Picture.
Inspect this Picture in a PictureInspector window, where inspection of specific pixels is possible.
Return True if this Picture is not being displayed.
Write this Picture back to its file. If an extension is not specified the default is .bmp.
Write this Picture to filename filename and re-set filename and title. Make sure to specify the file format by the extension.
If filename is a file set the filename and title of this Picture. Otherwise set both to the empty string.
Set the PIL RGB Image image in this Picture and load the PixelAccess object from the Image.
Set title of this Picture to str title.
Inspect this Picture in a PictureInspector window, where inspection of specific pixels is NOT possible.
Display this Picture in an external application. The application used is system dependant.
Update this Picture’s open PictureInspector window
Return a new PIL RGB Image object of Color col, w pixels wide, and h pixels high.
Return the short path (containing directory and filename) of str filename.
Initialize this Picture module. Must be done before using Pictures.
Return a new PIL RGB Image object loaded from filename f.