PHP Classes
elePHPant
Icontem

Thumbs Crop: Create thumbnails and crop images in directory

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2012-07-25 (4 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 253 All time: 7,372 This week: 1,109Up
Version License PHP version Categories
thumbs-crop 0.1GNU General Publi...5.0PHP 5, Graphics
Description Author

This class can create thumbnails and crop images in directory.

It can traverse the list of files in a directory and for those with the JPEG file name extension it create thumbnails and cropped versions of the original images.

The class can also delete the thumbnail images if the original image does not exist.

Picture of Tiago André
Name: Tiago André <contact>
Classes: 4 packages by
Country: Portugal Portugal

Details
This php class creates thumbs from a folder to another, and crop the image to a square

Usage:

import('thumbs.class.php');
$croping= new thumbs_crop('images','images/thumbs'); $croping->crop_all();

Adicional functions: $croping->get_pictures();

return a array with the pictures inside the images folder

$croping->del_pictures();

It detects if the thumb have a mother-image, if not it detect the thumb, is very usefull to delect thumbs that are not in use.

WARNINGS:
Make sure you have created the folder images and the thumbs folder.
Make sure you have gd extension in php.ini
make sure you haver permissions
  Files folder image Files  
File Role Description
Accessible without login Plain text file readme Doc. readme
Plain text file thumbs_class Class thumbs.class

 Version Control Unique User Downloads Download Rankings  
 0%
Total:253
This week:0
All time:7,372
This week:1,109Up