Fix failed stat when using setEmbedImagesin HTML writer

Fixes #1084 
Closes #1085
This commit is contained in:
JeongHean Kim 2019-07-25 15:00:23 +09:00 committed by Adrien Crivelli
parent 8a1cb04830
commit dbc8777c43
1 changed files with 4 additions and 1 deletions

View File

@ -643,7 +643,10 @@ class Html extends BaseWriter
} else {
$imageDetails = getimagesize($filename);
if ($fp = fopen($filename, 'rb', 0)) {
$picture = fread($fp, filesize($filename));
$picture = '';
while (!feof($fp)) {
$picture .= fread($fp, 1024);
}
fclose($fp);
// base64 encode the binary data, then break it
// into chunks according to RFC 2045 semantics