JIU 0.12.0 Homepage

net.sourceforge.jiu.color
Class Invert

java.lang.Object
  extended bynet.sourceforge.jiu.ops.Operation
      extended bynet.sourceforge.jiu.ops.ImageToImageOperation
          extended bynet.sourceforge.jiu.color.Invert

public class Invert
extends ImageToImageOperation

Creates an inverted (negated) version of an image. This is done by subtracting each sample value of a channel from the maximum sample for that channel. The maximum sample for a channel is given by IntegerImage.getMaxSample(int). For paletted images, just the palette is treated that way. Supported image types: IntegerImage. Input and output image can be the same object.

Author:
Marco Schmidt

Constructor Summary
Invert()
           
 
Method Summary
 void process()
          Inverts the input image, reusing an output image if one has been specified.
 
Methods inherited from class net.sourceforge.jiu.ops.ImageToImageOperation
canInputAndOutputBeEqual, ensureImagesHaveSameResolution, ensureInputImageIsAvailable, ensureOutputImageResolution, getInputImage, getOutputImage, setCanInputAndOutputBeEqual, setInputImage, setOutputImage
 
Methods inherited from class net.sourceforge.jiu.ops.Operation
addProgressListener, addProgressListeners, getAbort, removeProgressListener, setAbort, setProgress, setProgress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Invert

public Invert()
Method Detail

process

public void process()
             throws MissingParameterException,
                    WrongParameterException
Inverts the input image, reusing an output image if one has been specified. For paletted images, inverts the palette. For all other types, subtracts each sample of each channel from the maximum value of that channel.

Overrides:
process in class Operation
Throws:
MissingParameterException - if the input image is missing
WrongParameterException - if any of the specified image parameters are unsupported or of the wrong width or height

JIU 0.12.0 Homepage

Copyright © 2000, 2001, 2002, 2003, 2004 Marco Schmidt