Tuesday 3 May 2016

Difference Between Coupling and Cohesion

Coupling Indicate the relationship between the different modules. Cohesion indicates a relation inside of a single module.
Coupling Cohesion

Saturday 30 April 2016

Resized and Saved Uploaded Image in PHP

Image resizing is an important task because if uploaded image size is bigger than requirement and we are not resizing it then it will consume server space and bandwidth which is not good.
So Resizing is necessary .you need to use four PHP GD functions for achieve this.

imagejpeg PHP GD Function

Creates and output an image to browser or saved into a file

Syntax:

bool imagejpeg ( resource $image [, string $filename [, int $quality ]] )

imagecopyresized PHP GD Function

Copy and resized the specific part of an image

Syntax:

bool imagecopyresized ( resource $dst_image , resource $src_image , int $dst_x , int $dst_y , int $src_x , int $src_y , int $dst_w , int $dst_h , int $src_w , int $src_h )