-
Notifications
You must be signed in to change notification settings - Fork 0
BmpIO
This class is responsible for all the IO operations that concern *.bmp images.
This class is built with the Singleton pattern, and as such, only one instance of it can exist at a time in the app. This instance can be accessed via the getInstance() method.
A given Image is saved on disk via the write(Image, String) method. This method is nothing more than a wrapper for ImageIo.write().
In order to read an image, the read() method initates this process by starting 2 threads, a Producer and a Consumer. The producer then reads the file bit by bit, and puts the data into a BlockingQueue. The consumer reads those bits and builds the bmp image in a BitmapImage object.
Being a class that extends GenericJob, the execution time is monitored in the read() method via the Timer singleton.
-
Classes documentation
- 'App'
- 'objects.GenericJob'
- 'objects.filters.GenericFilter`
- 'objects.filters.IFilter`
- 'objects.filters.Filters`
- 'objects.image.BitmapImage'
- 'objects.image.Image'
- 'objects.image.Pixel'
- 'objects.runnables.Producer'
- 'objects.runnables.Consumer'
- 'objects.singletons.ArgParser'
- 'objects.singletons.BmpIO'
- 'objects.singletons.FilterBuilder'
- 'objects.singletons.Prompter'
- 'objects.singletons.Timer'
-
Overview of the homework requirements