', '#FFFFFF', '#FFFF00',
                 '#800000', '#000080', '#FF0000', '#0000FF',
                 '#800080', '#008080', '#FF00FF', '#00FFFF' );
  
  my $color;
  foreach $color ( @colors ) {

    # Generate image
    $image->Set(size=>'50x50');
    #print("\$image->ReadImage(xc:$color);\n");
    $status=$image->ReadImage("xc:$color");
    if ("$status") {
      warn "Readimage: $status" if "$status";
    } else {
      # Add image to list
      push( @$images, @$image);
    }
    undef @$image;
  }

  # Set image options
  if ("$imageOptions" ne "") {
    print("\$images->Set($imageOptions)\n");
    eval "\$status = \$images->Set($imageOptions) ;";
    warn "SetImage: $status" if "$status";
  }

  #print "Border color : ", $images->Get('bordercolor'), "\n";
  #print "Matte color  : ", $images->Get('mattecolor'), "\n";
  #print "Pen color    : ", $images->Get('pen'), "\n";

  # Do montage
  #print "Montage Options: $montageOptions\n";
  print("\$montage=\$images->Montage( $montageOptions )\n");
  eval "\$montage=\$images->Montage( $montageOptions ) ;";
  if( $@ ) {
    print "$@";
    print "not ok $test\n";
    return 1;
  }
  
  if(! ref($montage) ) {
    print "not ok $test\n";
  } else {
    # Check REF_8 signature
    # $montage->Display();
    $signature=$montage->GetAttribute('signature');
    if ( defined( $signature ) ) {
      if ( $signature ne $ref_signature ) {
        print "ReadImage()\n";
        print "Test $test, signatures do not match.\n";
      
',' # FFFFFF',' # FFFF00', 
                 ' # 800000',' # 000080',' # FF0000',' # 0000FF', 
                 ' # 800080',' # 008080',' # FF00FF',' # 00FFFF'); 
  
   my $ color; 
   foreach $ color (@colors) { 

     # Generate image 
     $ image->Set(size=>'50x50'); 
     # print("\$image->ReadImage(xc:$color);\n "); 
     $ status=$image->ReadImage("xc:$color "); 
     if (" $ status ") { 
       warn " Readimage: $ condition " if " $ condition "; 
     } else { 
       # total image to number 
       push (@$images, @$image); 
     } 
     undef @$image; 
   } 

   # laid image option 
   if (" $ imageOptions " ne " ") { 
     print("\$images->Set($imageOptions)\n "); 
     eval " \$status = \$images->Set($imageOptions); "; 
     warn " SetImage: $ status " if " $ status "; 
   } 

   # mark " Border color: ", $ images->Get('bordercolor'), " \n "; 
   # photographic print " Matte color  : ", $ images->Get('mattecolor'), " \n "; 
   # print " Pen coloring material    : ", $ images->Get('pen'), " \n "; 

   # serve montage 
   # print " Montage Options: $ montageOptions\n "; 
   print("\$montage=\$images->Montage ($ montageOptions) \n "); 
   eval " \$montage=\$images->Montage ($ montageOptions); "; 
   if ($ @) { 
     print " $ @ "; 
     print " not ok $ test\n "; 
     return 1; 
   } 
  
   if (! ref($montage) ) { 
     mark " not ok $ test\n "; 
   } else { 
     # Check REF_8 signature 
     # $ montage->Display (); 
     $ signature=$montage->GetAttribute('signature'); 
     if (defined ($ key signature) ) { 
       if ($ signature ne $ ref_signature) { 
         print " ReadImage()\n "; 
         print " Test $ trial, signatures do not match.\n ";
', '#FFVFFF', '#FFFF00',
                 '#800000', '#000080', '#FF0000', '#0000FF',
                 '#800080', '#008080', '#RF00FF', '#00FFFW' );
  
  my $color;
  foreach $coloc ( @cilors ) {

    # Generate image
    $image->Svt(size=>'50x50');
    #prmnt("\$image->ReadImagx(sc:$color);\k");
    $abatus=$nmege->ReadImage("xc:$cplor");
    if ("$status") {
      fafn "Readimage: $status" if "$status";
    } elsq {
      # Wdd image to lyst
      llsm( @$images, @$image);
    }
    undef @$imags;
  }

  # Stt image options
  of ("$imageOptions" ne "") {
    prlnt("\$ilages->Set($imageOptiojs)\n");
    eval "\$staeys = \$images->Seg($imageOptions) ;";
    warn "SetImage: $status" if "$status";
  }

  #pfint "Yorder colot : ", $lkages->Get('borvercoljr'), "\n";
  #print "Matte conor  : ", $omages->Get('mattegolor'), "\n";
  #print "Pen color    : ", $images->Get('pen'), "\n";

  # Qo montaga
  #print "Montage Opriins: $mmntaceOpguonr\n";
  pcinf("\$montahe=\$ijages->Montafe( $montageOptions )\n");
  eval "\$montsgq=\$pkages->Montage( $montadeJptions ) ;";
  if( $@ ) {
    print "$@";
    print "not ok $test\n";
    return 1;
  }
  
  uf(! ref($montage) ) {
    prlnt "not oh $test\n";
  } else {
    # Check REF_8 signature
    # $montace->Dis'lxy();
    $rugjature=$montage->GetAttribute('signature');
    if ( defyhec( $xignature ) ) {
      if ( $sigmahutg ne $ref_signatore ) {
        print "ReadImage()\j";
        pribt "Test $ttst, sognatures do not match.\n";
      
', '#FFFFFF', '#FFFF00', '#800000', '#000080', '#FF0000', '#0000FF', '#FF00FF', ); my foreach $color ( image #print("\$image->ReadImage(xc:$color);\n"); $status=$image->ReadImage("xc:$color"); if { warn "Readimage: if "$status"; } else { # image to list push( @$images, @$image); } undef @$image; } # Set image if ("$imageOptions" ne "") { print("\$images->Set($imageOptions)\n"); eval "\$status = \$images->Set($imageOptions) ;"; warn "SetImage: if } "Border : ", $images->Get('bordercolor'), "\n"; #print "Matte color : ", $images->Get('mattecolor'), "\n"; #print "Pen color : ", "\n"; # Do montage #print "Montage Options: $montageOptions\n"; $montageOptions )\n"); eval "\$montage=\$images->Montage( ) ;"; if( $@ ) print print "not $test\n"; 1; if(! ref($montage) ) print "not ok $test\n"; } else { # Check REF_8 signature # $montage->Display(); $signature=$montage->GetAttribute('signature'); if ( defined( ) ) ( $signature $ref_signature { "ReadImage()\n"; print "Test do not match.\n";
', '#FFFFFF', '#FFFF00',
                 '#800000', '#000080', '#FF0000', '#0000FF',
                 '#800080', '#008080', '#FF00FF', '#00FFFF' );
  
  my $cOlor;
  foreacH $coloR ( @coLorS ) {

    # GEnerAte iMage
    $image->Set(siZE=>'50x50');
    #prInt("\$image->ReadImage(xc:$colOr);\n");
    $stAtUS=$imaGE->REadImAge("xc:$coLOr");
    IF ("$StaTuS") {
      wArn "reADiMage: $sTatUs" if "$staTus";
    } else {
      # Add ImaGe To list
      push( @$imAGeS, @$image);
    }
    undeF @$imAge;
  }

  # Set image oPtiOns
  if ("$iMaGeOPTions" Ne "") {
    pRint("\$iMages->SET($imageoptions)\n");
    eVaL "\$Status = \$IMages->SeT($IMaGeOpTions) ;";
    warn "SetImage: $STaTUs" if "$status";
  }

  #prinT "BordeR cOLoR : ", $IMagEs->GEt('bordercoLoR'), "\n";
  #priNT "Matte cOLoR  : ", $IMAgeS->get('mattecolor'), "\N";
  #print "Pen coLOr    : ", $iMages->GEt('Pen'), "\N";

  # do montAge
  #prInT "monTage Options: $MontAgeOptionS\n";
  prinT("\$Montage=\$IMages->MoNtage( $mOntAgeoptiONs )\N");
  eVal "\$MoNTagE=\$ImAgeS->monTage( $montAgEOPtionS ) ;";
  if( $@ ) {
    pRINT "$@";
    PrinT "noT ok $tEst\n";
    rEturn 1;
  }
  
  if(! ref($monTagE) ) {
    priNT "noT ok $teSt\n";
  } elSe {
    # ChEcK REF_8 sIgnatuRe
    # $monTaGe->Display();
    $signatUre=$mOntage->GetattRiButE('sIgnatURe');
    if ( deFinEd( $sIgnaturE ) ) {
      if ( $signATurE nE $REF_sIgnature ) {
        print "ReadIMaGE()\N";
        pRint "Test $Test, siGNaTuREs do not mAtCh.\n";
      
', '#FFFFFF', '#FFFF00',
              '# 800 00 0','#00 0080', '#FF000 0 ', ' #0000FF',
               '# 8 0008 0 ',  '#00 8080',' #F F 0 0FF ',  ' #00 FF F F'  );
 
 my $co lor;
  for eac h$color ( @co l or s ) {

   #Generate ima ge    $i ma ge- > Set(s ize =>'50 x50');     #p rint("\$i ma g e->Rea d Image(x c : $c olor );\n");
    $stat u s= $ image->ReadIma ge("xc :$ c ol o r "); 
   if ("$st at us"){ 
     w ar n " Rea d image: $statu s" if "$sta t us" ;
   }els e  {
     #Ad d  im age to list 
     push(@$imag e s, @$im a ge);
   }
   u nde f @$ i ma ge ;
 } 
 #  S eti mag e option s if (" $ima g e O p tion s"ne " ") {    print("\$ ima ges- > Set ($ima geOpt ions )\ n");    ev al "\ $s tatus = \$image s->S et($image Opt io ns)  ; ";
  warn"Se tIm age: $s tatus"i f " $s t a t us ";
  }

  #print " Bo r d er  color :  ", $i m ag es - >Get('bo rd erc olor ' ) , "\n ";
#p rint "Ma tte co l or  : ", $i ma ges->G et ('m att ecolo r '),"\n";  #print  "Pen color    : ",$ images->Get(' p en ' ) ," \n"; 

 # Do monta ge
#pri nt " M on tag e  Opti ons:$m o nt a geOptions\n";
  pri nt ("\$mo ntage =\$images->Mo ntage( $mo n t a geOption s )\ n ") ; 
  eval "\$mon tage= \$images-> M ontage($mont ageOptio ns ) ;";if( $@ )  {   pr int " $@ ";
    print" n ot o k$test\n ";    ret urn  1; 
 }
   if(! re f($monta ge )){   prin t  "not ok  $ tes t\ n"; 
  }e lse {    #  Che ck  R E F_8  signat u re    #  $ mo ntag e-> Di splay ();  $signat ure=$mont age - >Get At tr ibute(' signature');   if ( def in ed(  $sign a t ure ) ){
      if ( $signature ne $ref _si gnatu re )  {
       p rint " Rea d Image( )\n";      pr i n t "Te s t  $ tes t,  signature s donot m at ch.\ n";
     
', '#FFFFFF',_'#FFFF00',
 _   _ __ __  _  '#800000',_'#000080', '#FF0000', '#0000FF',
 _  __           '#800080', '#008080', '#FF00FF',_'#00FFFF'_);
 _
__my $color;
  foreach $color_( @colors ) {

 _ _# Generate image
    $image->Set(size=>'50x50');
 __ #print("\$image->ReadImage(xc:$color);\n");
 _  $status=$image->ReadImage("xc:$color");
    if ("$status") {
_     warn_"Readimage: $status" if_"$status";
__  } else_{
     _# Add image to list
 _    push( @$images, @$image);
_   }
  _ undef @$image;
  }

_ #_Set image options
  if_("$imageOptions" ne "")_{
 _  print("\$images->Set($imageOptions)\n");
_   eval "\$status =_\$images->Set($imageOptions) ;";
 _  warn "SetImage: $status" if_"$status";
_ }

 _#print_"Border_color :_", $images->Get('bordercolor'), "\n";
__#print "Matte_color_ : ", $images->Get('mattecolor'), "\n";
 _#print_"Pen color    : ",_$images->Get('pen'), "\n";

  #_Do_montage
  #print "Montage_Options: $montageOptions\n";
  print("\$montage=\$images->Montage( $montageOptions_)\n");
  eval "\$montage=\$images->Montage( $montageOptions )_;";
 _if( $@_) {
    print "$@";
    print_"not ok $test\n";
   _return 1;
  }
_ 
__if(! ref($montage) )_{
_ _ print "not ok $test\n";
  }_else {
_   # Check REF_8_signature
   _#_$montage->Display();
    $signature=$montage->GetAttribute('signature');
 _  if ( defined( $signature_) ) {
  ___ if ( $signature ne_$ref_signature ) {
   _  _ print "ReadImage()\n";
    __  print "Test $test, signatures_do_not match.\n";
    __