PHP Classes
elePHPant
Icontem

JPEG Slicer: Slice large images in multiple parts

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2008-01-19 (8 years ago) RSS 2.0 feedNot enough user ratingsTotal: 495 All time: 5,549 This week: 866Up
Version Licenses PHP version Categories
jpegslicer 1Freely Distributable4.0Graphics
Description Author

This class can be used to slice large images in several parts to make it display faster.

It takes a JPEG image and generates 4 images, each one with a slice of the original image.

The sliced image parts are store in a distinct sub-directories.

Picture of Anish Karim C
  Performance   Level  
Name: Anish Karim C <contact>
Classes: 5 packages by
Country: India India
Age: 34
All time rank: 82445 in India India
Week rank: 507 Up44 in India India Up

Details
<------********************************************************************************************************------->
					thecoderin@aol.in
<------********************************************************************************************************------->

	FILE 	= JPEGSlicer.php
	TYPE	= PHP CLASS
	AUTHOR	= ANISH KARIM C, <thecoderin@aol.in>
	DATE	= 20 Jan 2008
	
	DESCRIPTION :
	 JPEGSlicer is a JPEG image resizer-Slicer class written in pure php.
	It is used to resize and slice the entire image into 4 sub parts and this will be help to load the imge faster in the post upload section.

HOW TO USE :

	JPEGSlicer(directory, temp_image,selection,resize)
	
		-->directory 	= directory name to be uploaded (string)
		
		-->temp_image	= The temporary image file example: $_FILES['image']['tmp_name'] (string)
		
		-->selection	= The selection for resize (dtring)
			->if selection = 'height'
				the image is resized , ie. new image height will be resize value of the function parameter
			->if selection = 'width'
				the image is resized , ie. new image width will be resize value of the function parameter
			->if selection ='nill'
				NO IMAGE RESIZE PLEASE ASSIGN resize = 0
				
		-->resize		=	value assigned to the fixed selection (integer)
			resize will be zero if the selection goes to zero
			
			
			THE IMAGES WILL BE IN THE object->filename ARRAY
	
3 type configuration

$orginal_Img_object	=	new JPEGSlicer('slice', $image,'nill',0); //JPEG SLICE WITHOUT RESIZE
$width_Img_object	=	new JPEGSlicer('slice', $image,'width',100); //JPEG SLICE WITH RESIZE ACCORDING TO WIDTH SIZE = 100px
$height_Img_object	=	new JPEGSlicer('slice', $image,'height',100); //JPEG SLICE WITH RESIZE ACCORDING TO HEIGHT SIZE = 100px


DEMO :

 A live demo is also added with this class, it includes two php files

1. upload_example.php -- to upload image

2. uploaded_example.php -- to display the uploaded image with the use of JPEGSlicer class


ENJOY...

thecoderin@aol.in
anish Karim C.

  Files folder image Files  
File Role Description
Plain text file JPEGSlicer.php Class The class file
Accessible without login Plain text file upload_example.php Example Example Page
Accessible without login Plain text file uploaded_example.php Example Example Page - 2
Accessible without login Plain text file Readme.txt Doc. readme

 Version Control Unique User Downloads Download Rankings  
 0%
Total:495
This week:0
All time:5,549
This week:866Up
User Comments (1)