Please bookmark this page to avoid losing your image tool!

Image Secret Revealer Tool

(Free & Supports Bulk Upload)

Drag & drop your images here or

The result will appear here...
You can edit the below JavaScript code to customize the image tool.
function processImage(originalImg, bitPlane = 0, channel = 'rgb') {
    // Create canvas to process the image
    const canvas = document.createElement('canvas');
    const ctx = canvas.getContext('2d');
    
    // Set canvas dimensions to match the original image
    canvas.width = originalImg.width;
    canvas.height = originalImg.height;
    
    // Draw the original image onto the canvas
    ctx.drawImage(originalImg, 0, 0);
    
    // Extract image data
    const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
    const data = imageData.data;
    
    // Ensure bitPlane is a valid integer between 0 and 7 (0 is Least Significant Bit - LSB)
    const plane = Math.max(0, Math.min(7, parseInt(bitPlane, 10) || 0));
    const mask = 1 << plane;
    
    const ch = channel.toLowerCase().trim();
    
    // Loop through all pixels and extract the desired bit plane to reveal hidden information (steganography)
    for (let i = 0; i < data.length; i += 4) {
        const r = data[i];
        const g = data[i+1];
        const b = data[i+2];
        
        // Extract the bit and scale it to 255 (visible) or 0 (black)
        const rBit = (r & mask) ? 255 : 0;
        const gBit = (g & mask) ? 255 : 0;
        const bBit = (b & mask) ? 255 : 0;
        
        if (ch === 'r' || ch === 'red') {
            data[i] = rBit;
            data[i+1] = rBit;
            data[i+2] = rBit;
        } else if (ch === 'g' || ch === 'green') {
            data[i] = gBit;
            data[i+1] = gBit;
            data[i+2] = gBit;
        } else if (ch === 'b' || ch === 'blue') {
            data[i] = bBit;
            data[i+1] = bBit;
            data[i+2] = bBit;
        } else {
            // Default to all channels (RGB)
            data[i] = rBit;
            data[i+1] = gBit;
            data[i+2] = bBit;
        }
        
        // Force alpha to 255 to ensure any revealed data is completely opaque and visible
        data[i+3] = 255; 
    }
    
    // Put the processed image data back onto the canvas
    ctx.putImageData(imageData, 0, 0);
    
    return canvas;
}

Free Image Tool Creator

Can't find the image tool you're looking for?
Create one based on your own needs now!

Description

The Image Secret Revealer Tool is designed to detect and expose hidden information within an image using bit plane analysis. By isolating specific bit planes (from the least significant bit to the most significant bit) across different color channels like red, green, or blue, the tool can reveal patterns or data hidden through steganography. This tool is useful for digital forensics, cybersecurity investigations, and learning about data hiding techniques in digital images.

Leave a Reply

Your email address will not be published. Required fields are marked *