使用php中的imagick库从文件中显示

can you help me please ?

i wrote the following code to display the alphabet images from directory and i run this code through CLI on linux terminal and i get nothing no image displayed ??!!

this is the code:

<?php
$name='LUBNA';
$length=  strlen($name);
$name_array=array();
$image_path='/var/www/letters/';

for($i=0; $i<$length; $i++) {

    $name_array[$i]=$name[$i];

}


    foreach ($name_array as $value) 
    {

        $image = $image_path.$value.'.png';

        $im = new Imagick();

        $im->readImage( $image );


}

?>

thanks dears;

Hello just wanna show you the correct code of my question finally i did it :-

<?php

$name='lubna';
$name=strtoupper($name);
$length=  strlen($name);
$name_array=array();
$image_path='/var/www/letters/';

$image_array=array();
$image_hight=array();
for($i=0; $i<$length; $i++) {

    $name_array[$i]=$name[$i];
    $image_array[$i]=$image_path.$name[$i].'.png';
    $size=  getimagesize($image_array[$i]);
    $hight=$size[1];
    $image_hight[$i]=$hight;

}

$hight1=  array_sum($image_hight);
$image = new Imagick();
$image->newImage(120, $hight1, new ImagickPixel('none'));
$image->setImageFormat('png');
$offset=0;

  foreach($name_array as $id=>$value) 
   {  

    $img= new Imagick($image_path.$value.'.png');

    $image->compositeimage($img, imagick::COMPOSITE_COPY,0, $offset);

    $offset=$offset+$image_hight[$id];
   }
//header('Content-type: image/png');
//echo $image;
   $image->setImageFormat('png');
   $image->writeimage('/tmp/name.png');
   $cmd1="display /tmp/name.png";
   $run1=  exec($cmd1);

 ?>