This way you have a subgroup of layers that stick together. You can also pass another canvas as a new layer. append ( color ( 1 ), color ( 0 ), type= "radial" ) You control the range of the gradient center with the optional spread parameter (between 0.0 and 1.0). If you also define the optional type parameter as "radial" you get a radial gradient. append ( color ( 1 ), color ( 0 ) )īoth linear and radial gradients are defined by two colors. Linear gradients can be defined as two colors: The canvas.append() method has optional path parameters: fill, background, stroke (black, transparent and transparent colors by default) and strokewidth. Paths from NodeBox can be transformed to a pixel layers as well. The layer will fill the entire canvas by default. Opaque fill layers are created from a standard NodeBox color(). draw ( )The canvas.append() method has four ptional parameters: the x and y position in pixels and w and h dimensions in pixels. If you are using images with an alpha channel the best way to import them is as transparent TIFF and not as a PNG (which can have jagged edges in Core Image).Ī canvas with two layers from image files is easy enough: l = canvas. append (movieframe )Ĭonsider we have the following images, leaf.jpg and lily.tif.Ĭore Image can use JPEG, GIF, PNG and TIFF images. append (path, background= None, fill= None, stroke= None, strokewidth= None ) canvas. append (clr1, clr2, type= "linear", spread= 0.0 ) canvas. It is placed at the center of the canvas by default. The canvas.append() method adds a new layer to the top of the canvas. #Nodebox image processing movie#a group of layers), or Quicktime movie frames. ), lists of pixels colors, another layer or canvas (i.e. You can create layers from image files, fill colors, linear or radial gradients, paths (ovals, text. canvas ( 150, 150 )Ī canvas is a container of many layers which you can position, scale, rotate, blend, filter, etc. You can set an optional quality parameter to "high" to use 128-bit pixel depth but this is unnecessary in most cases. It takes two parameters: the width and height of the canvas. The canvas() command returns a new, empty canvas. It takes some time to load the library the first time. Put the coreimage library folder in the same folder as your script so NodeBox can find the library.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |