I want to add one other peice of functionality if its possible. Can I say some where in this PHP, if the image is over a Y_height, myNewHeight is Z_height?
Code: Select all
<?php
echo "<?xml version=\"1.0\" encoding =\"ISO-8859-1\" ?>\n";
echo "<images>\n";
if ($handle = opendir('images')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
list($width, $height) = getimagesize("images/".$file);
echo "<myImage myPath=\"images/" . "$file\"" . " myWidth=\"" . "$width\"" . " myHeight=\"". "$height\"" ." />\n";
}
}
closedir($handle);
}
echo "</images>\n"
?>