---
title: "PixelData | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> 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;  
}

##### Index

### Properties[](#properties)

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

## Properties[](#properties-1)

### components[](#components)

components: number

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

### height[](#height)

height: number

Height of the image in number of pixels

### pixels[](#pixels)

pixels: Uint8ClampedArray | Uint8Array

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

### width[](#width)

width: number

Width of the image in number of pixels
