LSB Visualization

See how Least Significant Bit (LSB) steganography replaces the final bit of pixel color channels to hide data.

How LSB Steganography Works

This demo shows how the LSB technique embeds secret message bits ('101') into the least significant bits of a single pixel's RGB values.

Original Pixel Values

Secret Bits to Hide

Explanation (Step 1/3)

Initial explanation text.

Adaptive Channel Selection

Explore how the "Enhanced LSB" method chooses specific color channels based on pixel brightness to improve visual stealth.

Adaptive Channel Selection (Enhanced LSB)

Enhanced LSB selects *two* specific color channels (R, G, or B) to hide data in, based on the pixel's overall brightness (intensity). This aims for better visual stealth compared to simple LSB. Drag the slider to simulate different pixel intensities.

Simulate Pixel Intensity

Dark (0) Medium (128) Bright (255)
120
Medium Pixel Area

Selected Channels for Embedding

For this medium pixel area (intensity: 120), Enhanced LSB embeds data using the LSBs of:

Red Channel (Skipped)
Green Channel (USED)
Blue Channel (USED)

Rationale: Perceptual Hiding Strategy

a

Dark Pixels (<85): Use R + G. Human vision is more sensitive to changes in the Blue channel in dark areas, so modifying it is avoided.

Medium Pixels (85-170): Use G + B. The Green channel carries significant brightness detail; modifying Red in mid-tones might be more noticeable.

Bright Pixels (>170): Use R + B. In very bright areas, the Green channel contributes heavily to luminance; changes here might be more perceptible than in R or B.