����JFIF��`�`�����Viewing File: /home/u820193700/domains/throtllr.in/public_html/api/dummy_frame.php
<?php
$frame = intval($_GET['frame'] ?? '1');
$width = 800;
$height = 500;
$image = imagecreatetruecolor($width, $height);
$bg = imagecolorallocate($image, 28, 28, 28); // 1C1C1C
$fg = imagecolorallocate($image, 163, 32, 32); // A32020
imagefill($image, 0, 0, $bg);

// Draw frame number
$text = "360 Frame " . str_pad($frame, 3, '0', STR_PAD_LEFT);
$font = 5;
$tw = imagefontwidth($font) * strlen($text);
imagestring($image, $font, ($width - $tw)/2, 30, $text, $fg);

// Download and cache a bike image locally to avoid downloading 36 times
$cacheFile = 'bike_cache.jpg';
if (!file_exists($cacheFile)) {
    // A nice side-profile bike from unsplash
    $url = 'https://images.unsplash.com/photo-1558981403-c5f9899a28bc?q=80&w=400';
    file_put_contents($cacheFile, file_get_contents($url));
}

if (file_exists($cacheFile)) {
    $bikeImg = imagecreatefromjpeg($cacheFile);
    if ($bikeImg) {
        $bx = imagesx($bikeImg);
        $by = imagesy($bikeImg);

        // Simulate rotation by rotating the image in 2D space (10 degrees per frame for 36 frames = 360 degrees)
        $angle = ($frame - 1) * 10;
        
        // Background color for rotated area
        $rotBg = imagecolorallocatealpha($bikeImg, 28, 28, 28, 0);
        $rotatedBike = imagerotate($bikeImg, -$angle, $rotBg);

        $rx = imagesx($rotatedBike);
        $ry = imagesy($rotatedBike);

        // Center it
        $destX = ($width - $rx) / 2;
        $destY = ($height - $ry) / 2 + 30;

        imagecopy($image, $rotatedBike, $destX, $destY, 0, 0, $rx, $ry);
        imagedestroy($bikeImg);
        imagedestroy($rotatedBike);
    }
}

header('Content-Type: image/jpeg');
imagejpeg($image, null, 80);

imagedestroy($image);
?>
Back to Directory �������}�!1AQa"q2���#B��R��$3br� %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������������� ������w�!1AQaq"2�B���� #3R�br� $4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz������������������������������������������������������������������������ ��?��_��+��?��(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(�����