scooby545 Posted August 7, 2009 Share Posted August 7, 2009 hi, am using getimagesize to get the width and height of an image $dns_path = "http://www.mydomain.com"; $filename = "$dns_path/Uploads/Content/$row0[media]"; $fileinfo = getimagesize("$filename"); $imgwidth = $fileinfo[0]; $imgheight = $fileinfo[1]; have tried several variations of this script but just keep getting 1024 x 768 as the output have no idea where its getting those sizes from as the jpg is definatley there and is only 300 x 200 ?? am getting pretty confused and a little frustrated at this point anyone have any ideas what could be going on and why im getting these values ? any help on this would be greatly appreciated dave Link to comment https://forums.phpfreaks.com/topic/169222-getimagesize-giving-wrong-width-n-height/ Share on other sites More sharing options...
micah1701 Posted August 7, 2009 Share Posted August 7, 2009 not as a fix for your code that, other wise looks fine, try testing with something like this: <?php $img = imagecreatefromjpeg ($filename); $x = imagesx ($img); $y = imagesy ($img); imagedestroy ($img); echo "$x x $y"; ?> Link to comment https://forums.phpfreaks.com/topic/169222-getimagesize-giving-wrong-width-n-height/#findComment-892894 Share on other sites More sharing options...
scooby545 Posted August 7, 2009 Author Share Posted August 7, 2009 nah is still the same its like its locked into a loop wiv those sizes Link to comment https://forums.phpfreaks.com/topic/169222-getimagesize-giving-wrong-width-n-height/#findComment-892898 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.