Jump to content


PDO and Image Resizing

  • Please log in to reply
No replies to this topic

#1 jackbravo

  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 03 October 2006 - 07:47 PM

Hi all

I'm trying to get a script to resize an image and then save it to MySQL using PHP PDO.
After resizing an image one normally uses imagejpeg to either display the image directly in the browser or save it to a file.
But I want to save it on the database, without having to store it on a temporary file.

The extra problem resides in that PDO uses streams to transfer LOBs to the database http://www.php.net/pdo#AEN148731. So I dont think i can do something like:
$image = ob_get_contents();

$stmt = $conn->prepare('INSERT INTO image ( ? )');

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users