add png handle 3

hotfix/远程访问多媒体中心
LMR 7 years ago
parent 568c03eb8c
commit b732fe9fc1

@ -334,7 +334,7 @@ class Info_amp extends CI_Controller
$png_base64 = $this->input->post('png_base64');
//$png_base64 = 'iVBORw0KGgoAAAANSUhEUgAAABwAAAASCAMAAAB/2U7WAAAABlBMVEUAAAD///+l2Z/dAAAASUlEQVR4XqWQUQoAIAxC2/0vXZDrEX4IJTRkb7lobNUStXsB0jIXIAMSsQnWlsV+wULF4Avk9fLq2r8a5HSE35Q3eO2XP1A1wQkZSgETvDtKdQAAAABJRU5ErkJggg==';
$file = md5($png_base64).'.jpg';
$path = realpath('../cht-system/views/from_word').'/'.$file;
$path = realpath('../cht-system/views/information/word_img').'/'.$file;
$png_base64 = str_replace('data:image/png;base64,', '', $png_base64);
$png_base64 = str_replace('data:image/jpg;base64,', '', $png_base64);
$png_base64 = base64_decode($png_base64);
@ -347,7 +347,7 @@ class Info_amp extends CI_Controller
if($png_base64 && $size) {
echo(json_encode(array(
'status' => 'success',
'path' => '/information-view/from_word/'.$file,
'path' => '/information-view/information/word_img/'.$file,
'width' => $size[0],
'height' => $size[1]
)));

Loading…
Cancel
Save