Tag: image

Image Resize Simple class

Here is a sample class file for image resize. imageResize.class Download the FileĀ  save it in web root and add .php extension to the fileĀ  . How to use ? <?php require_once(‘imageResize.class.php’); // Path to File imagejpeg(imageResize::Resize($fileSavePath,$width,$height),$newFileName); ?> $fileSavePath should

Tagged with: , , ,

How to validate image File field using Javascript

<script type=”text/javascript”> function validateFileExtension(ld) { if(!/(\.bmp|\.gif|\.jpg|\.jpeg)$/i.test(ld.value)) { alert(“Invalid image file type.”); ld.form.reset(); ld.focus(); return false; } return true; } </script>

Tagged with: , , ,

How to create thumbnails ( Logic ) in PHP

How to create thumbnails ( Logic ) How to create thumbnails ? To generate thumbnails we do the following: Scan a folder for JPG and PNG files (gd does not support GIF anymore, because the packing algorithm in GIF is

Tagged with: , , ,