Syed Abdul Baqi

PHP Image Thumb Generator

Posted on: October 31, 2009

Hello Everybody,

Recently I have written new Image Thumb Generator class for PHP for one of my project. The class is having very small footprint and easy to use, just wanna share with all of you. It is available for download here. This class uses GD Library for generating thumb images, so make sure you have GD Library Extension enabled before use it.


include 'image.class.php';
$image = new Imagethumb(<source file path>, <Maintain Aspect Ratio(TRUE|FALSE)>[DEFAULT: FALSE]);   
$image->getThumb('thumb file path to save', (int)<width>, (int)<height>);


include 'image.class.php';
$image = new Imagethumb('Blue hills.jpg', true);   
$image->getThumb('thumb.jpg', 125, 125);

Comments are welcomed….


1 Response to "PHP Image Thumb Generator"

Hola, Amigo, Mi consulta es como uso , este class, En mi caso
yo tengo mi codigo para subir imagen,

echo “El Servidor acepta sólo archivos de tamaño menor que $SIZE.”;
echo ” Ingrese de Nuevo su Aviso

echo “El Servidor acepta sólo imagenes”;
echo ” Ingrese de Nuevo su Aviso


while (@fopen($UPLOAD_DIR.$alternativo.$nombreaponer,”r”))








Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: