| invert.cxx |  | 
Invert an image file (create a negative) using the function transformImage() 
 Usage: example_invert infile outfile
                
 
#include <iostream>
#include <vigra/multi_array.hxx>
#include <vigra/stdimagefunctions.hxx>
#include <vigra/multi_math.hxx>
#include <string.h>
using namespace vigra; 
int main(int argc, char ** argv)
{
    if(argc != 3)
    {
        std::cout << "Usage: " << argv[0] << " infile outfile" << std::endl;
        
        return 1;
    }
    
    try
    {
        
        {
           
            
            
            
            
            
            
            using namespace multi_math;   
            out = 255 - in;
            
            if(strcmp(argv[2], "-") == 0)
            {
                
            }
            else
            {
            }
        }
        else
        {
           
            
            
            
            
            
            
            using namespace multi_math;   
            
            if(strcmp(argv[2], "-") == 0)
            {
                
            }
            else
            {
            }
        }
    }
    catch (std::exception & e)
    {
        std::cout << e.what() << std::endl;
        return 1;
    }
    
    return 0;
}