Premetto che mi sono appena messo a smanettare con le librerie GD per cui devo entrare ancora nella "logica" adatta.
Come da manuale la funzione
imagecreatefromjpeg() returns an image identifier representing the image obtained from the given filename
chiedo a voi un chiarimento (per tutti i dubbi, spero). che cosa significa? o meglio cos'è questo image identifier?
infatti se stampo il risultato della funzione sottostante con
echo $MyImg;
mi stampa:
Resource id #1

GRAZIE!

Codice PHP:
<?
function LoadJpeg ($imgname) {
    
$im imagecreatefromjpeg ($imgname); // Attempt to open 
    
if (!$im) { // See if it failed 
        
$im  imagecreate (15030); // Create a blank image 
        
$bgc imagecolorallocate ($im255255255);
        
$tc  imagecolorallocate ($im000);
        
imagefilledrectangle ($im0015030$bgc);
        
// Output an errmsg 
        
imagestring ($im155"Error loading $imgname"$tc);
    }
    return 
$im;
}
//header ("Content-type: image/pjpeg");
$sImgPath 'img/sf_intestazione.jpg';
// $fp = fopen ('http://localhost:81/imm/utils/showimage.php?action=show&id=1&tbl=foto_immobili', "w");
$MyImg LoadJpeg($sImgPath);
echo 
$MyImg;
?>