Class BrightnessFilter


public class BrightnessFilter extends Filter
This is a Filter that changes the brightness and contrast of a source image.
Version:
1.0
Author:
Douglas Brown
  • Constructor Details

    • BrightnessFilter

      public BrightnessFilter()
      Constructs a default BrightnessFilter object.
  • Method Details

    • setContrast

      public void setContrast(double contrast)
      Sets the contrast.
      Parameters:
      contrast - the contrast.
    • getContrast

      public double getContrast()
      Gets the contrast.
      Returns:
      the contrast.
    • setBrightness

      public void setBrightness(int brightness)
      Sets the brightness.
      Parameters:
      brightness - the brightness.
    • getBrightness

      public int getBrightness()
      Gets the brightness.
      Returns:
      the brightness.
    • isChanged

      public boolean isChanged()
      Determines if the filter settings have changed.
      Overrides:
      isChanged in class Filter
      Returns:
      true if changed
    • newInspector

      protected Filter.InspectorDlg newInspector()
      Specified by:
      newInspector in class Filter
    • initInspector

      protected Filter.InspectorDlg initInspector()
      Specified by:
      initInspector in class Filter
    • clear

      public void clear()
      Clears this filter
      Overrides:
      clear in class Filter
    • refresh

      public void refresh()
      Refreshes this filter's GUI
      Overrides:
      refresh in class Filter
    • dispose

      public void dispose()
      Description copied from class: Filter
      Disposes of this filter.
      Overrides:
      dispose in class Filter
    • initializeSubclass

      protected void initializeSubclass()
      Specified by:
      initializeSubclass in class Filter
    • setOutputPixels

      protected void setOutputPixels()
      Sets the output image pixels to a bright version of the input pixels.
      Specified by:
      setOutputPixels in class Filter
    • getLoader

      public static XML.ObjectLoader getLoader()
      Returns an XML.ObjectLoader to save and load filter data.
      Returns:
      the object loader