---
name: "al_get_pixel_size"
section: "3"
platform: "linux"
package: "allegro"
version: "5.2.11.3-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/al_get_pixel_size"
---

# al\_get\_pixel\_size(3)

Allegro 5 API

## NAME

al\_get\_pixel\_size - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  int al_get_pixel_size(int format)
  ```

## DESCRIPTION

Return the number of bytes that a pixel of the given format occupies. For blocked pixel formats (e.g. compressed formats), this returns 0.

## SEE ALSO

[ALLEGRO\_PIXEL\_FORMAT(3)](/ALLEGRO_PIXEL_FORMAT/3.md), [al\_get\_pixel\_format\_bits(3)](/al_get_pixel_format_bits/3.md)
