---
title: "PixelData | Client js | Api client"
description: "Documentation for MapTiler Client"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Type Alias PixelData

Informations about an image

type PixelData \= {  
    [components](#components): number;  
    [height](#height): number;  
    [pixels](#pixels): Uint8ClampedArray | Uint8Array;  
    [width](#width): number;  
}

-   Defined in [tiledecoding.ts:7](https://github.com/maptiler/maptiler-client-js/blob/f88659ae276c959a754e4c0f3b5c2aae1f483caa/src/tiledecoding.ts#L7)

##### Index

### Properties

[components](#components) [height](#height) [pixels](#pixels) [width](#width)

## Properties

### components[](#components)

components: number

Number of components per pixel (3 if image is RGB, 4 if image is RGBA)

-   Defined in [tiledecoding.ts:23](https://github.com/maptiler/maptiler-client-js/blob/f88659ae276c959a754e4c0f3b5c2aae1f483caa/src/tiledecoding.ts#L23)

### height[](#height)

height: number

Height of the image in number of pixels

-   Defined in [tiledecoding.ts:19](https://github.com/maptiler/maptiler-client-js/blob/f88659ae276c959a754e4c0f3b5c2aae1f483caa/src/tiledecoding.ts#L19)

### pixels[](#pixels)

pixels: Uint8ClampedArray | Uint8Array

The array of pixels as RGBRGB or RGBARGBA in a row-major order

-   Defined in [tiledecoding.ts:11](https://github.com/maptiler/maptiler-client-js/blob/f88659ae276c959a754e4c0f3b5c2aae1f483caa/src/tiledecoding.ts#L11)

### width[](#width)

width: number

Width of the image in number of pixels

-   Defined in [tiledecoding.ts:15](https://github.com/maptiler/maptiler-client-js/blob/f88659ae276c959a754e4c0f3b5c2aae1f483caa/src/tiledecoding.ts#L15)
