PHP Classes

Simple PHP Image Resize: Create thumbnails of images in a given directory

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 228 All time: 8,160 This week: 310Up
Version License PHP version Categories
simple-image-resize 1.0Q Public License ...5.0PHP 5, Graphics
Description 

Author

This class can create thumbnails of images in a given directory.

It can traverse a given directory to find image files with given file name extensions.

The class can create thumbnail images with a given width or height limit and store them in a given separate directory.

Picture of Marcus Brasizza
  Performance   Level  
Name: Marcus Brasizza <contact>
Classes: 6 packages by
Country: Brazil Brazil
Age: 37
All time rank: 63646 in Brazil Brazil
Week rank: 312 Up26 in Brazil Brazil Up
Innovation award
Innovation award
Nominee: 3x

Winner: 1x

Example

<?php
$tam
= '240';
$path = '/opt/images/toop/big/darkness.jpg';
$path_dest = '/opt/images/toop/resized/';

/*BUILD THE OBJECT */

$red = new Redimensionar;
$red->AdicionaTamanho($tam); // adiciona o primeiro tamanho pra fazer a proporção
$red->AdicionaExtensoes('jpeg'); // adiciona uma extensão pra procurar arquivos pra redimensionar
$red->AdicionaExtensoes('jpg'); // adiciona uma extensão pra procurar arquivos pra redimensionar
$red->__set('ArqOrigem',$path); // adiciona um diretório de onde está o arquivo pra conversão
$red->__set('DirDestino',$path_dest); // adiciona um diretório de onde será colocado os arquivos
$convertidos = $red->executar();

echo
"<pre>";
print_r($convertidos);
echo
"</pre>";
?>


  Files folder image Files  
File Role Description
Accessible without login Plain text file usage.php Example Usage file
Plain text file Redimensionar.php Class core file

 Version Control Unique User Downloads Download Rankings  
 0%
Total:228
This week:0
All time:8,160
This week:310Up