You are here: getimagesize not working on images from MYSQL « PHP « IT news, forums, messages
getimagesize not working on images from MYSQL

Posted by timothy johnson on 10/17/58 11:21

$id = $_GET['id'];
$query = "SELECT * FROM myPhotos WHERE photoId='$id'";
$result = mysql_query($query);
$row = mysql_fetch_assoc($result);
$im = imagecreatefromstring($row[photoData]);

$size = getimagesize($im);

header('Content-Type: image/jpeg');
imagejpeg($im, NULL, 100);

I have this nice little php page to return my images from a database,
and everything runs fine except then I try to use getimagesize, I
then get..

Warning: getimagesize(Resource id #4): failed to open stream:

do I have to do something else, this function works fine if I am using
it on a fileimage, why not an image from a database???

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация