pnm mod.pad
From DavinciWiki
		
		
		
| Contents: Description, Arguments, Usage, Examples, Images, Related Functions Supported Under Version: > 1.69 Current Davinci Version: 2.27 64-bit Safe: No 
 Description Adds a border to the specified data. Located in "pnm_mod" module. 
 Arguments and Return Values Inputs: a Val (byte or other), pad color and pad size Outputs: a Val that has a pad of specified color and size 
 Usage Syntax: pnm_mod.pad(data = VAL , color = BOOL, left = INT, bottom = INT, top = INT, bottom = INT) data: any davinci array (most likely a byte image array) color: 0 for black, 1 for white (Default is 0) left: pixels on the left side to pad by (Default is 0) right: pixels on the right side to pad by (Default is 0) top: pixels on the top side to pad by (Default is 0) bottom: pixels on the bottom side to pad by (Default is 0) 
 Examples dv> a=read("http://davinci.asu.edu/images/d/df/llama_face.jpg")
Downloading.done.
.............................................
/tmp/dv_7970/QkWBv0: bip JPEG image: 640x530x3, 8 bits
640x530x3 array of byte, bip format [1,017,600 bytes]
dv> b=pnm_mod.pad(a,0,70,30,150,20)
740x700x3 array of byte, bip format [1,554,000 bytes]
dv> display(a)
Writing /tmp/dv_7970/DD3fDO: 640x530x3 PNG file.
dv>  display(b)
Writing /tmp/dv_7970/XAStFa: 740x700x3 PNG  file.
 | DavinciWiki Mini-Nav Bar Contents 
 Contact Developers 
 All other topics 
 
 Related Functions 
 Recent Core Changes Modified On: 02-26-2010 | 


