Chapter **. THE THUMBNAILIMAGE CLASS

Images are often of unequal dimensions, and their file sizes can vary greatly. This inconsistency creates problems when downloading and displaying a group of images because one large image can take up the entire screen, dwarfing smaller images. Also, if image files are large, they can slow downloading to an unacceptable pace.

One solution to the problem of inconsistently sized images is to create a thumbnail image class, which creates small images (thumbnails) of equal size. By reducing the quality of an image, this class will be able to further reduce file size and hence download times.

Since we intend to use the DirectoryItems class with directories of images, this additional supporting class takes the next step toward improving the utility of the DirectoryItems class. Furthermore, developing this class should give you a good idea of when a method should be private, how to limit access to data members with set and get methods, how to set default values for data members upon declaration, and how to ensure that resources are disposed of properly.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.17.91