# Image Formats

_Peios Kernel / Userspace interfaces / System and device interfaces / Video4Linux_

> The V4L2 API was primarily designed for devices exchanging image data with applications. The struct v4l2_pix_format and struct v4l2_pix_format_mplane structures define the format and layout of an image in memory. The former is used with…

<a id="rst-image-formats"></a>
<a id="rst-pixfmt"></a>

<!-- SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later -->

<!-- c:namespace: V4L -->

The V4L2 API was primarily designed for devices exchanging image data with applications. The struct `v4l2_pix_format` and struct `v4l2_pix_format_mplane` structures define the format and layout of an image in memory. The former is used with the single-planar API, while the latter is used with the multi-planar version (see [Single- and multi-planar APIs](</kernel/userspace/userspace-api/media-v4l/planar-apis.md#rst-planar-apis>)). Image formats are negotiated with the [VIDIOC_S_FMT](</kernel/userspace/userspace-api/media-v4l/vidioc-g-fmt.md#rst-vidioc-g-fmt>) ioctl. (The explanations here focus on video capturing and output, for overlay frame buffer formats see also [VIDIOC_G_FBUF](<https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/userspace-api/media/v4l/vidioc-g-fbuf.rst?id=9021cc14f7d98b4a1d2c932f52c5343d4d0f6b92>).)

- [Single-planar format structure](</kernel/userspace/userspace-api/media-v4l/pixfmt-v4l2.md>)
- [pixfmt-v4l2-mplane](<https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/userspace-api/media/v4l/pixfmt-v4l2-mplane.rst?id=9021cc14f7d98b4a1d2c932f52c5343d4d0f6b92>)
- [Standard Image Formats](</kernel/userspace/userspace-api/media-v4l/pixfmt-intro.md>)
- [Indexed Format](</kernel/userspace/userspace-api/media-v4l/pixfmt-indexed.md>)
- [pixfmt-rgb](<https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/userspace-api/media/v4l/pixfmt-rgb.rst?id=9021cc14f7d98b4a1d2c932f52c5343d4d0f6b92>)
- [Raw Bayer Formats](</kernel/userspace/userspace-api/media-v4l/pixfmt-bayer.md>)
- [YUV Formats](</kernel/userspace/userspace-api/media-v4l/yuv-formats.md>)
- [HSV Formats](</kernel/userspace/userspace-api/media-v4l/hsv-formats.md>)
- [Depth Formats](</kernel/userspace/userspace-api/media-v4l/depth-formats.md>)
- [pixfmt-compressed](<https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst?id=9021cc14f7d98b4a1d2c932f52c5343d4d0f6b92>)
- [SDR Formats](</kernel/userspace/userspace-api/media-v4l/sdr-formats.md>)
- [Touch Formats](</kernel/userspace/userspace-api/media-v4l/tch-formats.md>)
- [Metadata Formats](</kernel/userspace/userspace-api/media-v4l/meta-formats.md>)
- [pixfmt-reserved](<https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst?id=9021cc14f7d98b4a1d2c932f52c5343d4d0f6b92>)
- [Colorspaces](</kernel/userspace/userspace-api/media-v4l/colorspaces.md>)
- [Defining Colorspaces in V4L2](</kernel/userspace/userspace-api/media-v4l/colorspaces-defs.md>)
- [colorspaces-details](<https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/userspace-api/media/v4l/colorspaces-details.rst?id=9021cc14f7d98b4a1d2c932f52c5343d4d0f6b92>)
