> ## Documentation Index
> Fetch the complete documentation index at: https://docs.generalrobotics.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# ImageClient

## ImageClient

Inherits from: [`ZenohClient`](/robot-api/reference/sim/zenoh/base_client/ZenohClient)

*No class docstring.*

### Inherited methods

* From [`ZenohClient`](/robot-api/reference/sim/zenoh/base_client/ZenohClient): `getLatestMessage`, `process_latest_msg`, `msg_cb`, `run`, `publish`, `stop`

### **init**

```python theme={null}
ImageClient.__init__(client_dict, agent_dict = None, shared_session = None)
```

*No docstring provided.*

<ResponseField name="Arguments">
  <ParamField query="client_dict" type="" required>
    *No description provided.*
  </ParamField>

  <ParamField query="agent_dict" type="">
    *No description provided.*
  </ParamField>

  <ParamField query="shared_session" type="">
    *No description provided.*
  </ParamField>
</ResponseField>

### publish\_image

```python theme={null}
ImageClient.publish_image(data: np.ndarray, encoding: str = 'rgb8', compressed: bool = True, format: str = 'jpeg', quality: int = 85) -> None
```

Publish an image to the topic.

<ResponseField name="Arguments">
  <ParamField query="data (np.ndarray)" type="np.ndarray" required>
    Image data as numpy array
  </ParamField>

  <ParamField query="encoding (str)" type="str">
    Image encoding (e.g., "rgb8", "32FC1")
  </ParamField>

  <ParamField query="compressed (bool)" type="bool">
    Whether to use compressed image format (default: True)
  </ParamField>

  <ParamField query="format (str)" type="str">
    Compression format ("jpeg" or "png"), only used if compressed=True
  </ParamField>

  <ParamField query="quality (int)" type="int">
    JPEG quality (0-100), only used for JPEG compression
  </ParamField>
</ResponseField>

<ResponseField name="Returns">
  <ResponseField name="returns" type="None" />
</ResponseField>

### get\_image

```python theme={null}
ImageClient.get_image() -> Optional[np.ndarray]
```

*No docstring provided.*

<ResponseField name="Returns">
  <ResponseField name="returns" type="Optional[np.ndarray]" />
</ResponseField>
