Skip to Content
Object-Oriented PHP
book

Object-Oriented PHP

by Peter Lavin
June 2006
Intermediate to advanced content levelIntermediate to advanced
216 pages
5h 26m
English
No Starch Press
Content preview from Object-Oriented PHP

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Intermediate PHP

Intermediate PHP

Lorna Jane Mitchell
Learning PHP 7

Learning PHP 7

Antonio L Zapata (GBP)
Learning PHP

Learning PHP

David Sklar

Publisher Resources

ISBN: 1593270771Catalog PageErrata