Function wood_grain::wood [−][src]
#[must_use] pub fn wood(
width: u32,
height: u32,
offsetstdev: f64,
length_scale: f64,
wood_profile: &WoodProfile
) -> Result<RgbImage, NormalError>
width
: width of the image to be generatedheight
: height of the image to be generatedoffsetstdev
: signifies how large the offset should be (the center of the wood grain is randomly shifted in the x and y directions).length_scale
: denotes the average length of spacing between grains in pixels.
Errors
Returns BadVariance
error if offsetstdev
is infinite.