# image

Python API: `depthai_nodes.message.creators.image`

## Functions

### create_image_message

```python
def create_image_message(image: np.ndarray, is_bgr: bool = True, img_frame_type: dai.ImgFrame.Type = dai.ImgFrame.Type.BGR888i) -> dai.ImgFrame:
```

Create an ImgFrame from an integer image array.

Parameters

 * `image` (`np.ndarray`): Non-empty CHW or HWC image with one or three channels. When both layouts are plausible, a leading size
   of 1 or 3 selects CHW. Floating-point image values are rejected.
 * `is_bgr` (`bool`): Whether three-channel input is BGR. False converts RGB input to BGR.
 * `img_frame_type` (`dai.ImgFrame.Type`): Requested DepthAI frame type. Grayscale input switches to GRAY8 unless the requested
   type begins with RAW or GRAY.

Returns

 * `dai.ImgFrame`: Image message with payload, dimensions, and frame type set.

Raises

 * `ValueError`: If neither channel layout is recognized or the image contains floating-point values.
