add new comparison method rgb_difference that resembles arithmetical difference per...
[imager.git] / lib / Imager / Preprocess.pm
index 40eaaaa..dd9bb96 100644 (file)
@@ -8,7 +8,7 @@ use Text::ParseWords;
 our @EXPORT = qw(preprocess);
 our @ISA = qw(Exporter);
 
-our $VERSION = "1.002";
+our $VERSION = "1.003";
 
 sub preprocess {
   unshift @ARGV, grep /^-/, shellwords($ENV{IMAGER_PREPROCESS_OPTS})
@@ -139,6 +139,7 @@ sub byte_samples {
     s/\bIM_LIMIT\(/IM_LIMIT_8(/g;
     s/\bIM_RENDER_LINE\(/i_render_line(/g;
     s/\bIM_FILL_COMBINE_F\b/i_fill_combine_f/g;
+    s/\bIM_ABS\b/abs/g;
   }
   
   @lines;
@@ -168,6 +169,7 @@ sub double_samples {
     s/\bIM_LIMIT\(/IM_LIMIT_double(/g;
     s/\bIM_RENDER_LINE\(/i_render_linef(/g;
     s/\bIM_FILL_COMBINE_F\b/i_fill_combinef_f/g;
+    s/\bIM_ABS\b/fabs/g;
   }
 
   @lines;
@@ -281,6 +283,10 @@ object.
 
 =item *
 
+IM_ABS(sample) - calculate the absolute value of an IM_WORK_T value.
+
+=item *
+
 IM_SAMPLE_MAX - maximum value for a sample
 
 =item *