Page 1 of 1

Posted: 2006-05-23T14:42:46-07:00
by Bonzo
I would think you need something like this but it does not work !

If I get time and nobody else comes up with an answer I will have another look at it.

Anthony

Code: Select all

<!doctype html public "-//W3C//DTD HTML 4.01//EN">
<html>
   <head>
      <title>Table of images</title>
   </head>
<body>

<?php

// Directory containing the images - need the trailing slash /
$read = 'photos/';
  
// Open the directory and create an array of the images
$myDirectory = opendir($read);
  
while($entryName = readdir($myDirectory))
{
// This will only select jpg images from the folder
if (strtolower(substr($entryName, -3)) == "jpg")
$dirArray[]=$entryName;
}
    
closedir($myDirectory);
 
// Count the number of images
$indexCount = count($dirArray);
  
for ($i=0; $i<$indexCount; $i++)
{

$name[$i] = $read.$dirArray[$i];

exec("/usr/local/bin/composite -gravity southeast scale.gif {$name[$i]} {$name[$i]}"); 

}

?>

</body>
</html>


Posted: 2006-05-23T14:44:24-07:00
by ridera
mogrify or same name in and out, I think.

Be certain you have a good backup.

Posted: 2006-05-24T19:36:17-07:00
by anthony
For how too.. See IM Examples, Annotating Images
http://www.cit.gu.edu.au/~anthony/graph ... nnotating/

their are lots of examples. It is then just a matter of looping over your images Which you should have made a seperate backup of.
See final looping suggetions in mogrify notes
http://www.cit.gu.edu.au/~anthony/graph ... s/#mogrify