Note Submitter: mauricio dot guarize at gmail dot com
Reason: non-english
----
Ho sviluppato questo esempio basato sulla documentazione
di php.net/manual riguardo alla generazione di immagini in PHP e vorrei condividere con voi.Allora eccolo:
<?php
$file="img/image1.png";
$img =imagecreatefrompng($file);
if ($img) {
//Ottiene la larghezza reale della nostra immagine .png
$img_width = imagesx($img);
//Ottiene l'altezza reale della nostra immagine .png
$img_height = imagesy($img);
//Pulisce le risorse
ImageDestroy($img);
}
echo '<table>
<tr>
<td><img src="img/image1.png" ></td>
</tr>
<tr>
<td>La larghezza dell\'immagine e : '.$img_width.' pixel</td></tr>
<tr>
<td>L\'altezza dell\'immagine e : '.$img_height.' pixel </td>
</tr></table>';
?>
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.