[Swift-commit] r6778 - SwiftTutorials/ATPESC_2013-08-06/modis/bin
    davidk at ci.uchicago.edu 
    davidk at ci.uchicago.edu
       
    Mon Aug  5 18:16:28 CDT 2013
    
    
  
Author: davidk
Date: 2013-08-05 18:16:28 -0500 (Mon, 05 Aug 2013)
New Revision: 6778
Modified:
   SwiftTutorials/ATPESC_2013-08-06/modis/bin/rgb_adjust_color.pl
Log:
Fix for case sensitivity in hex values in color translation table
Modified: SwiftTutorials/ATPESC_2013-08-06/modis/bin/rgb_adjust_color.pl
===================================================================
--- SwiftTutorials/ATPESC_2013-08-06/modis/bin/rgb_adjust_color.pl	2013-08-05 22:47:27 UTC (rev 6777)
+++ SwiftTutorials/ATPESC_2013-08-06/modis/bin/rgb_adjust_color.pl	2013-08-05 23:16:28 UTC (rev 6778)
@@ -11,13 +11,13 @@
 open(TRANSLATION_TABLE, "$translation_table") || die "Unable to open $translation_table";
 while(<TRANSLATION_TABLE>) {
    my ($from, $to) = split;
-   $tr_table{$from} = $to;
+   $tr_table{lc($from)} = lc($to);
 }
 
 # Read data
 $/ = \3;
 while(<FILE_INPUT>) {
-   my $hex = sprintf ("#%2.2X%2.2X%2.2X", unpack('C3', $_));
+   my $hex = lc(sprintf ("#%2.2X%2.2X%2.2X", unpack('C3', $_)));
 
    if(defined($tr_table{$hex})) { 
       my $new_value = $tr_table{$hex};
    
    
More information about the Swift-commit
mailing list