Get image height and width PHP ?

We can easily extract image information from the Image URL using PHP’s predefined function called getimagesize()

I Use this function whenever I need to know image HEIGHT and WIDTH, this function returns an array with 5 items, first, two are image Height and width, 3rd one is image type(png/jpg…etc, ) find more image types list below.. etc


We can use this function to get image height and width while uploading images

 

Type of Image

1 = GIF 5 = PSD 9 = JPC 13 = SWC
2 = JPG 6 = BMP 10 = JP2 14 = IFF
3 = PNG 7 = TIFF(intel byte order) 11 = JPX 15 = WBMP
4 = SWF 8 = TIFF(motorola byte order) 12 = JB2 16 = XBM

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
DMCA.com Protection Status
0
Would love your thoughts, please comment.x
()
x