<?php
$source = "C:/Users/ASUS/.gemini/antigravity/brain/69907928-efa2-41bd-997d-edfadc3e88d6/uploaded_image_1766891480063.jpg";
$output = "c:/xampp/htdocs/Imanoelci/app/Views/layout/photo_data.php";

if (file_exists($source)) {
    $data = file_get_contents($source);
    if ($data !== false) {
        $b64 = base64_encode($data);
        $content = "<?php\n// Generated Profile Photo Data\ndefine('PROFILE_PHOTO_B64', 'data:image/jpeg;base64,$b64');\n?>";
        if (file_put_contents($output, $content)) {
            echo "SUCCESS: B64 written to $output\n";
        } else {
            echo "ERROR: Failed to write to $output\n";
        }
    } else {
        echo "ERROR: Failed to read from $source\n";
    }
} else {
    echo "ERROR: Source not found: $source\n";
}
?>
