def draw_on_image(self, image, color=(<NUM_LIT:0>, <NUM_LIT:255>, <NUM_LIT:0>), alpha=<NUM_LIT:1.0>, size=<NUM_LIT:1>,<EOL>copy=True, raise_if_out_of_image=False, thickness=None):
image = np.copy(image) if copy else image<EOL>for bb in self.bounding_boxes:<EOL><INDENT>image = bb.draw_on_image(<EOL>image,<EOL>color=color,<EOL>alpha=alpha,<EOL>size=size,<EOL>copy=False,<EOL>raise_if_out_of_image=raise_if_out_of_image,<EOL>thickness=thickness<EOL>)<EOL><DEDENT>return image<EOL>
Draw all bounding boxes onto a given image.

Parameters
----------
image : (H,W,3) ndarray
    The image onto which to draw the bounding boxes.
    This image should usually have the same shape as
    set in BoundingBoxesOnImage.shape.

color : int or list of int or tuple of int or (3,) ndarray, optional
    The RGB color of all bounding boxes. If a single int ``C``, then
    that is equivalent to ``(C,C,C)``.

alpha : float, optional
    Alpha/transparency of the bounding box.

size : int, optional
    Thickness in pixels.

copy : bool, optional
    Whether to copy the image before drawing the bounding boxes.

raise_if_out_of_image : bool, optional
    Whether to raise an exception if any bounding box is outside of the
    image.

thickness : None or int, optional
    Deprecated.

Returns
-------
image : (H,W,3) ndarray
    Image with drawn bounding boxes.