Method Image.Image()->create()
- Method create
Image.Image Image.Image()
Image.Image Image.Image(Image.Imageimage)
Image.Image Image.Image(intxsize,intysize)
Image.Image Image.Image(intxsize,intysize,Colorcolor)
Image.Image Image.Image(intxsize,intysize,intr,intg,intb)
Image.Image Image.Image(intxsize,intysize,intr,intg,intb,intalpha)
Image.Image Image.Image(intxsize,intysize,stringmethod,method...)- Description
-
Initializes a new image object.


Image.Image
(XSIZE,YSIZE)Image.Image
(XSIZE,YSIZE,255,128,0)The image can also be calculated from some special methods, for convinience:
channel modes; followed by a number of 1-char-per-pixel strings or image objects (where red channel will be used), or an integer value: "grey" : make a grey image (needs 1 source: grey) "rgb" : make an rgb image (needs 3 sources: red, green and blue) "cmyk" : make a rgb image from cmyk (cyan, magenta, yellow, black) "adjusted_cmyk" : make a rgb image from cmyk (cyan, magenta, yellow, black) where the colors aren't 100% pure (C: 009ee0, M: e2007a, Y: ffec00, K: 1a171b). generate modes; all extra arguments is given to the generation function. These has the same name as the method: "<ref>test</ref>," "<ref>gradients</ref>" "<ref>noise</ref>" "<ref>turbulence</ref>" "<ref>random</ref>" "<ref>randomgrey</ref>" specials cases: "<ref>tuned_box</ref>" (coordinates is automatic) - Parameter
image -
Image to clone.
- Parameter
xsize - Parameter
ysize -
size of (new) image in pixels
- Parameter
color - Parameter
r - Parameter
g - Parameter
b -
background color (will also be current color), default color is black
- Parameter
alpha -
default alpha channel value
- Bugs
-
SIGSEGVS can be caused if the size is too big, due to unchecked overflow - (xsize*ysize)&MAXINT is small enough to allocate.
- See also