This is an application to perform various operations on image such as greyscale conversion, Cropping, Rotation, Sepia, etc. It is written in Java and Java Swing.
Interfaces in Code.
- Image This is an interface that defines all the public methods that can be performed on an image. It includes functions like blur, shapren, darken, split, etc
- Pixel this is an interface that defines all the public methods that can be performed on a pixel.
- Controller Helper
- ImageNew This is an interface that defines all the new features to be added.
- Features This interface defines the public methods of the controller that are accessible by the view.
- IView This interface defines the public methods of the view that are accessible by the controller.
Classes in Code.
- AbstractImage This class has implementations for all the methods which are same/similar for Greyscale and Color Image.
- ColorImage This is a class that stores/performs all the functions on a color image. It stores a color image as a matrix/grid of color pixels.
- GreyscaleImage This is a class that stores/performs all the functions on a greyscale image. it stores a greyscale image as a matrix/grid of greyscale pixels.
- AbstractPixel This class has implementations for all the methods which are same/similar for Greyscale and Color Pixel.
- GreyscalePixel This is a class that stores/performs all the functions on a greyscale pixel. a grid of greyscale pixels forms a greyscale image. Each greyscale pixel has 2 values -> value and transparency.
- ColorPixel This is a class that stores/performs all the functions on a color pixel. a grid of color pixels forms a color image. Each color pixel has 4 values -> red, blue, green and transparency.
- ControllerException This is the class used to handle exceptions that occur in the controller. It has functions that print exception messages without crashing the application.
- ImageApp This class is a representation of our image application. It calls the Image Controller.
- ImageController It is the controller that works alongside classes in the view. It mainly takes in the input and calls appropriate methods in the model and passes along the output to the view.
- ControllerException This helper class contains logic on handling some exceptions in the controller.
- ColorImageNew This class represent the new color image and has new functionalities.
- GreyscaleImageNew This class represent the new greyscale image and has new functionalities.
- HistogramImage Class to represent histogram.
- ControllerGUI This class represents the controller for GUI application
- JFrameView This class represents the main frame in our GUI window
- ImageAppGUI This class is a representation of our application. It calls the Image Controller for the GUI mode or interactive mode based on the conditions.
- Channel This enum is used to store the channels accepted in a greyscale image. The values can be red,blue,green.
- Image Type
- Run the JAR file of the program
- java -jar Program.jar
1.1. Run the ImageAppGUI program from the Command line with arguments "-text" to start the app in interactive text mode:
- java -jar Program.jar -text
1.2. Load the script using the command "run path-to-script". (e.g 'run res/scriptCommand.txt')
-
run script-file.txt
OR
- Run the program from the Command line with arguments "-file path-to-script"
- java -jar Program.jar -file path-of-script-file
Citation Image used : Blue, Green, and Red Abstract Illustration Dimensions : 640 x 427 License: Free to use Owned by: Alexander Grey URL: https://www.pexels.com/photo/blue-green-and-red-abstract-illustration-1566909/