func DilateDimension(pos, max, dilationFactor int, direction string) int {
	out := pos
	if direction == WhichPointBottomRight {
		out = out + dilationFactor
	} else {
		out = out - dilationFactor
	}

	if out < 0 {
		out = 0
	}
	if out > max {
		out = max
	}

	return out
}
// DilateDimension expands an axis by "dilationFactor" pixels (additive). It
// basically adds or subtracts pixels, while paying attention to not allow the
// lower bound of the image to go below 0.
DilateDimension expands an axis by "dilationFactor" pixels (additive). It
basically adds or subtracts pixels, while paying attention to not allow the
lower bound of the image to go below 0.
// DilateDimension expands an axis by " dilationFactor " pixels ( additive ) . It // basically adds or subtracts pixels while paying attention to not allow the // lower bound of the image to go below 0 .
func DilateDimension(pos, max, dilationFactor int, direction string) int {
	out := pos
	if direction == WhichPointBottomRight {
		out = out + dilationFactor
	} else {
		out = out - dilationFactor
	}
	if out < 0 {
		out = 0
	}
	if out > max {
		out = max
	}
	return out
}
func DilateDimension ( pos , max , dilationFactor int , direction string ) int { out := pos if direction == WhichPointBottomRight { out = out + dilationFactor } else { out = out - dilationFactor } if out < 0 { out = 0 } if out > max { out = max } return out }
DilateDimension expands an axis by "dilationFactor" pixels (additive).
DilateDimension expands an axis by " dilationFactor " pixels ( additive ) .