Skip to main content

Module pixels

Module pixels 

Source
Expand description

Pixel-domain conversion for the Y (luminance) channel.

Provides IDCT (coefficient → pixel) and forward DCT (pixel → coefficient) transforms for geometry-resilient steganography. Only operates on the Y channel — no RGB conversion needed since the DFT template is embedded in luminance.

Functions§

dct_block
8×8 forward DCT + quantize → 64 DCT coefficients.
dct_block_unquantized
8×8 forward DCT + divide by QT, but do NOT round.
idct_block
Dequantize + 8×8 IDCT → 64 spatial-domain pixel values.
jpeg_to_luma_f64
Convert entire Y-channel DctGrid → row-major f64 pixel array.
luma_f64_to_jpeg
Write f64 pixel array back into Y-channel DctGrid.
rgb_to_luma_blocks
Convert RGB pixel buffer to Y (luminance) 8×8 blocks.