How to put an image that is in binary from the database. at the ppt?

Apr 7, 2011 at 6:13 PM

hi all developers seeking a challenge .. or help a developer more ..

I've been starting their heads trying to put an image that comes from my database, butmy image is in binary and I can not place it in the file 01simple.php

appreciate your help ...
leaving my email for contact
ragarduno@ayp.com.mx

Coordinator
Apr 7, 2011 at 6:25 PM

Take a look at the 04inmemoryimage.php script in /Tests.

This takes an image as a PHP binary string (as might be retrieved from a database) and adds it to a slide using the PHPPowerPoint_Shape_MemoryDrawing class.

Apr 13, 2011 at 3:45 PM

Hi MarkBaker ...

I made a connection to the database and from there to send for blob records of thedatabase ..
Now you have to put my record is in binary imagecreatefromstring function.?

or to put my record in the function that record imagecreatefromstring I convert blob tostring.?

could send a piece of code to see if I right? or more or less guide me?

Apr 13, 2011 at 4:43 PM

Hi.. MarkBaker..

I use...

 

// $image_data = binary image from db
$image = ImageCreateFromString($image_data);
$temp = 'IMG_'.time().'.jpg';
ImageJPEG($image,$temp,75);
$shape->Image($temp,10,8);
unlink($temp);


Alexander...