...sembra non si possa operare direttamente sullo stream del file.
per cui ho risolto (parzialmente) con questa funzione che ho trovato nel manuale on-line, il problema però è che mi sputtana enormemente la qualità del file, anzi l'immagine diventa uno scarabocchio irriconoscibile:
Codice PHP:
function LoadJPEG ($imgURL) {
##-- Get Image file from Port 80 --##
$fp = fopen($imgURL, "r");
$imageFile = fread ($fp, 3000000);
fclose($fp);
##-- Create a temporary file on disk --##
$tmpfname = tempnam ("/temp", "IMG");
##-- Put image data into the temp file --##
$fp = fopen($tmpfname, "w");
fwrite($fp, $imageFile);
fclose($fp);
##-- Load Image from Disk with GD library --##
$im = imagecreatefromjpeg ($tmpfname);
##-- Delete Temporary File --##
unlink($tmpfname);
##-- Check for errors --##
if (!$im) {
print "Could not create JPEG image $imgURL";
}
return $im;
}
$imageData = LoadJPEG('http://localhost:81/imm/utils/showimage.php?action=show&id=2&tbl=foto_immobili');
header( "Content-Type: image/jpeg");
imagejpeg($imageData, '', 100);
:master: