php - How to obtain width and height of image after rotating it? -


how can width , height of image after rotating using imagerotate() in php?

here code:

<?php // file , rotation $filename = 'test.jpg'; $degrees = 180;  // content type header('content-type: image/jpeg');  // load $source = imagecreatefromjpeg($filename);  // rotate $rotate = imagerotate($source, $degrees, 0);  // output imagejpeg($rotate);  // free memory imagedestroy($source); imagedestroy($rotate); ?> 

but want before doing output, want width , height of rotated image. how can that?

i'm sure can similar this:

$data = getimagesize($filename); $width = $data[0]; $height = $data[1]; 

another option this:

list($width, $height) = getimagesize($filename);


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -