coobird.net icon

projects.coobird.net

projects.coobird.net - Thumbnailator

History of Thumbnailator

Thumbnailator diagram

Originally, Thumbnailator was designed to be an application which generates a picture gallery using images taken from a digital camera. Thumbnailator would utilize components from the Thumbnailator Core Classes in order to perform the thumbnail and static web page generation.

Currently, Thumbnailator is being re-designed to be a collection of classes which can be used to generate thumbnails. Rather than having a user interface request processes to a core class, new convenience methods will be provided by helper classes. Thumbnailator will also include utility applications which can be used to produce thumbnails.

The information provided in the following sections are about the previous iteration of Thumbnailator, and does not reflect the current state of Thumbnailator.

The Old Design

Information provided in this section is from a previous version of Thumbnailator (circa 2006), and does not reflect the current version of the software. For current information, please visit the Thumbnailator project.

thumbnailator diagram
Basic Thumbnailator diagram

Thumbnailator consists of three main classes: TCore, TGenerator, TGallery and TObject.

TCore class

The TCore class, as the name suggests, is the core of Thumbnailator. It will receive an array of TObjects that contain the parameters, which then will be processed by sending messages to the TGenerator and TGallery classes to produce thumbnails and a "gallery" HTML file.

Simply put, the TCore can be thought of as an virtual machine that executes instructions in the form of TObjects.

A TCore object can be instantiated by the user interface (such as TGui) to process TObjects. The UI also has the choice of having a line of communication with the TCore object via PipedInputStream in which messages will be sent back. These messages can be used by the UI to inform the user on the progress of the processing.

TGenerator class

The TGenerator class receives parameters from the TCore object to generate thumbnails and writes them to disk.

Once TGenerator receives the necessary information, it will proceed to create and write the thumbnails without any error reporting what-so-ever. (It's possible for the generator to encounter file I/O errors, but most of these types of errors can be checked ahead of time.) Therefore it is up to the UI and TCore to provide the error-checking.

Error reporting may be added in the future. (As some errors, such as the input file not being a valid image, cannot be checked without actually opening the file first, which would be resource wasting and self-defeating of keeping components separated by function.)

TGallery class

Although not yet actually written (except as an stand-alone prototype), this class will produce the HTML files that show the thumbnail which is linked to the actual file to display.

The actual file to display can also be a thumbnail.

TObject class

The TObject class contains all the parameters needed to produce thumbnails to the specification provided by the user. The main responsibility of the user interface is to construct valid TObjects that can be processed by the TCore.

Demonstration Graphical User Interface (TGui)

thumbnailator screenshot
TGui, demonstration interface

TGui is the demonstration graphical user interface (GUI). The GUI consists of a file browser in the main window, a preview window, and an action window that is used to specify the type of thumbnail to produce.

Currently, this GUI is designed to only produce a single thumbnail for a given file, therefore it does not take full advantage of the multiple thumbnail production capability of Thumbnailator. (Specifically, the GUI only produces TObjects that specify to produce a single thumbnail rather than producing multiple thumbnails.)


< Return to the current Thumbnailator project