add grid

From DavinciWiki
(Difference between revisions)
Jump to: navigation, search
Line 23: Line 23:
 
|
 
|
 
Before and After images
 
Before and After images
[[Image:grid_before.png]] [[Image:grid_after.png]]
+
[[Image:grid_before.png|300px]] [[Image:grid_after.png|300px]]
 
|
 
|
 
*[[byte]]
 
*[[byte]]

Revision as of 22:35, 31 January 2008

{{DavinciWiki_Function| Adds a grid of specified dimensions to a picture | Inputs: a byte picture

Outputs: a byte picture with a grid | Syntax: add_grid(data, dx, dy, line_color [, xo = INT] [, yo = INT] [, thick = INT])

 'data'         is the input picture
 'dx'           is the delta x for the vertical grid lines
 'dy'           is the delta y for the horizontal grid lines
 'line_color'   is the line color 'white,black,quarterwhite,quarterblack,halfwhite,halfblack'
 'xo'           is the x offset before the first vertical grid lines
 'yo'           is the y offset before the first horizontal grid lines
 'thick'        is the line_weight

|

dv> a
4480x1600x3 array of byte, bip format [21,504,000 bytes]
dv> b=add_grid2(a,640,640,"halfwhite",yo=320,thick=1)
4480x1600x3 array of byte, bip format [21,504,000 bytes]
dv> display(b)
Writing /tmp/dv_32752/4H2q1r: 4480x1600x3 PNG file.

| Before and After images grid before.png grid after.png |

|

|

  • general_science.dvrc

| 1.01 | }}

Personal tools