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 ...
Get Object-Oriented PHP now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.