Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Thank you!! In this assignment you will be developing an image manipulation program. The remaining laboratory assignments will build on this one, allowing you

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Java

Thank you!!

In this assignment you will be developing an image manipulation program. The remaining laboratory assignments will build on this one, allowing you to improve your initial submission based on feedback from your instructor. The program itself will be capable of reading and writing multiple image formats including jpg, png, tiff, and a custom format: msoe files. The program will also be able to apply simple transformations to the image like: Converting the image to grayscale . Producing the negative of the original image The transformations are applied to the image that appears on the screen (rather than the image originally loaded from the file) so that multiple transformations can be applied. For example, the user should be able to create a negative grayscale image by clicking both buttons. Handler Methods Your user interface does not need to match Figure 1 but does need to facilitate all of the functionality in an intuitive way. You must incorporate the following methods into your design: . void load ( ActionEvent event)--Handler for loading an image. . void reload (Action Event event)-Handler for re-loading an image. This reloads the most recently loaded image (does not show the file chooser dialog). void save (ActionEvent event) Handler for saving an image. void grayscale(ActionEvent event)Handler for converting an image to grayscale. void negative (ActionEvent event)--Handler for converting an image to its photo negative . You may use FXML but are not required to do so. . Load and reload images stored in the following image file formats: jpg, png, tiff, and .msoe. o Note that "large" . msoe images will be slow to load and save. Display the image that has been loaded . Use a FileChooser to select the image file to load and save. Convert an image to a grayscale version Convert an image to a negative version of the image Save images in the following image file formats: jpg . png . tiff, and , msoe. The format written must match the file extension For example, if the current picture was loaded from a .jpg file and the user enters image. png, the image must be saved in the .png file format. . The appropriate graphical user interface to support the operations listed above. . Handle the appropriate exceptions for the operations above The save button will open a FileChooser dialog box that will allow the user to select the destination folder and type in the filename and extension (showSaveDialog)). The program will then write the image to that file using the file format that matches the file extension. If an unsupported file extension is entered, the program will display an error message without attempting to save the image. You should write your own ImageIO class is responsible for loading and saving images. The class must have the following public class methods read (Path path)Reads in the specified image file and returns a javafx.scene. image. Image object containing the image. . write(Image image, Path path)-Writes the specified image to the specified path If the extension on the file passed to either of these methods is .msoe then the appropriate private class method below is called to do the actual work. . readMSOE (Path path) Reads an image file in .msoe format writeMSOE (Image image, Path path)-Writes an image file in msoe format. Both read) and write() must throw an IllegaLArgumentException if the path passed in has a file extension that specifies an unsupported image format

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions