### 13.2.1 Image structure in Xcas

An image in Xcas is a list with the following elements.

- The first element is itself a list of three integers; the number of channels (which will be 3 or 4), the number n of rows and the number p of columns used for the dimension of the image. Each channel will be an n×p matrix of integers between 0 and 255.
- A red channel.
- A green channel.
- A transparency channel.
- A blue channel.

The color of the point at line i and column j is determined by the values of the i,jth entry of the matrices.

Note that the number of points in the structure isn’t necessarily the same as the number of pixels on the screen when it is drawn. It is possible that a single point in the structure is represented by a small rectangle of pixels when it is displayed on the screen.