Bit Depth
Bit Depth (Color Depth / Bits Per Pixel)
Bit depth determines the number of possible color values each pixel can represent. Higher bit depths allow more colors and smoother gradients: 8-bit provides 256 values per channel (16.7M colors), while 16-bit provides 65,536.
Technical Detail
Total color count is calculated as 2^(bits_per_channel * num_channels). A 24-bit image uses 8 bits each for red, green, and blue, yielding 2^24 = 16,777,216 possible colors.
Example
```javascript
// Bit Depth: processing with Canvas API
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
ctx.drawImage(sourceImage, 0, 0);
const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
// Process pixels in imageData.data (RGBA array)
```
Related Tools
C
Compress Image
R
Resize Image
C
Crop Image
R
Rotate Image
F
Flip Image
C
Convert Image
W
Watermark Image
S
SVG to PNG
I
Image to Base64
R
Round Corners
A
Add Border
I
Image Filters
A
Adjust Image
B
Blur Image
S
Sharpen Image
M
Make Square
G
Grayscale Image
S
Sepia Image
P
Pixelate Image
S
Strip Image Metadata
Related Terms
Alpha Channel
Alpha Compositing
Aspect Ratio
AVIF
Batch Resize
Bit Depth (Audio)
Canvas
Chroma Subsampling
Chromatic Aberration
Color Grading (Image)
Color Profile
Color Space
Compression Artifact
Content-Aware Fill
Convolution
Crop
Defense in Depth
Dithering (Image)
DPI
DPI/PPI
EXIF
Feature Matching
Focus Stacking
Gamma
Gamut Mapping
HDR
Histogram
ICC Profile
Image Histogram
Image Interpolation
Image Optimization
Image Pyramid
Image Registration
Image Segmentation
IPTC
Lossless Compression
Lossy Compression
Metadata
Mipmap
Morphological Operations
Noise Reduction (Image)
Object Detection
Panorama Stitching
Raster Graphics
Rasterization
Resize
Resolution
Sprite Sheet
Texture Atlas
Thumbnail
Tone Mapping
Vector Graphics
Vignetting
WebP
XMP