This project is read-only.

Using generated images?

Jul 22, 2014 at 10:42 AM

I have a script that outputs an image, and usually I can use this image with something like:

<img src="data:image/png;base64,<?php echo base64_encode($image);?>" />

I need to use one of these generated images in the powerpoint presentation, is this possible?


Jul 22, 2014 at 11:49 AM
Edited Jul 22, 2014 at 11:50 AM
Just in case someone is wondering - i've answered my own question with the following:
$imageString = file_get_contents($image); // base 64 image string
$imageSrc = imagecreatefromstring($imageString); // convert to resource

$currentSlide = $powerpoint->createSlide();
$shape = new PHPPowerPoint_Shape_MemoryDrawing();
Just ensure you do images before text on every slide.