403Webshell
Server IP : 147.234.39.149  /  Your IP : 172.30.80.1
Web Server : nginx/1.28.3
System : Linux AICRAFT 6.6.114.1-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Mon Dec 1 20:46:23 UTC 2025 x86_64
User : dphoto ( 1000)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/aialbum.co.il/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/aialbum.co.il/heic-convert-test.php
<?php
header('Content-Type: text/plain; charset=utf-8');

$src = __DIR__ . '/test.heic';
$dst = __DIR__ . '/test.jpg';

echo "PHP: " . PHP_VERSION . "\n";
echo "Imagick loaded: " . (extension_loaded('imagick') ? 'YES' : 'NO') . "\n";

if(!extension_loaded('imagick')){
    exit("Imagick not loaded\n");
}

echo "Source exists: " . (file_exists($src) ? 'YES' : 'NO') . "\n";
echo "Source path: $src\n\n";

if(!file_exists($src)){
    exit("No test.heic found\n");
}

try {

    $im = new Imagick();

    echo "Reading HEIC (first frame only)...\n";

    // ✅ חשוב מאוד ל-HEIC מאייפון
$im->readImage('heic:' . $src);
    $im->setIteratorIndex(0);

    echo "Images in container: " . $im->getNumberImages() . "\n";

    // תיקון אוריינטציה
    if(method_exists($im, 'autoOrient')){
        $im->autoOrient();
        echo "Auto orientation applied\n";
    }

    // flatten (HEIC יכול להכיל alpha/depth)
    $im = $im->mergeImageLayers(Imagick::LAYERMETHOD_FLATTEN);

    $im->setImageFormat('jpeg');
    $im->setImageCompressionQuality(92);
    $im->stripImage();

    echo "Writing JPG...\n";

    $ok = $im->writeImage($dst);

    echo "Write result: " . ($ok ? 'SUCCESS' : 'FAILED') . "\n";
    echo "Output exists: " . (file_exists($dst) ? 'YES' : 'NO') . "\n";

    if(file_exists($dst)){
        echo "Output size: " . filesize($dst) . " bytes\n";
    }

    echo "\nDONE\n";

} catch(Throwable $e){

    echo "\nERROR OCCURRED:\n";
    echo $e->getMessage() . "\n";

    if($e instanceof ImagickException){
        echo "ImagickException detected\n";
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit