base64与图片输出屏幕
if ($base64) {
ob_start();
// 输出图像
imagepng($this->_image);
imagedestroy($this->_image);
$image_data = ob_get_contents();
ob_end_clean ();
$image_data_base64 = "data:image/png;base64,". base64_encode ($image_data);
$json = new Json();
$json->S($image_data_base64);
} else {
header('Cache-Control: private, max-age=0, no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header("content-type: image/png");
// 输出图像
imagepng($this->_image);
imagedestroy($this->_image);
}
{
"errno": 0,
"errdesc": "操作成功",
"timestamp": 1575036206,
"data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAAB4CAMAAAAzDfCvAAAAYFBMVEXz+/5/Onyaz8OXrb3btsDUyqu32JjTw96bvbK2pbfhx9LNppvWyt2qgqzk4u3Hss2capy5mr2NUoyQi52Ja5CUnKSXrKuGWomvl6+hfKC0lJmUXoeJTIHJuKWpgpOecI3PC2mTAAAPf0lEQVR4nO2di5arqBKGta+TNHLx3OfMnHn/tzxAFYiKSnEx7u78a0/WnuwECR9UFQVi152rt7c3/d/Rp/rH6oyG+EEyvN/i0D8/J9gT9YD/vCuc0DEOfkt5CT9DgDsC3TVSv/zLQ6nvq7wCp7f/QxSBPm/AH0Z9XeQ31Az6rOWe1GPlfw+BT5812ZN64rUq6n6vWdqhbP2j1D+XDfmkvnnVUp3GPGyl6CB/Us+4/HUVNs8O9SwLX6FmZc1eXkQVVQFVS7ZC/fRagXrLqma0dt7XmqlZ8xAasRr102ue3MqkT5+nnd/XxqfDVafXfOqPVVrr5kE5TeufVT96t9fpF69k6pcSuVWpJZyilo1TSP1HqjHuherWu4z6U4GuDz1GlkL9qQNdDfocKpX6U3Q9GHoEeDr1p8p1NvQt4AnUn6qt26099F3gu9SfaqLbbXptAf0Y+Bb1p5ophO5VCXoi8KdBP1tR6F750CnAnwb9ZO1D9yJBJwNfD/Cvr6xfU1/80RVoIsP7dgg9WXnAl6V8XQW66MWjq9BEhngl6FWAd5b5NaALXT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LynCOL7CfrLyzKOA97Z1Aue99NU4RKwqSC5kvf7VaDPpulJ+rST+eCNiHnv8qHbtrwg9dmyfw70+2WgA28CdKDdELrV9aAvtnrQrdH9atAp+rQK36nr03Of50ZLJFK13N5DrqI97j790ISm0tCJPn2tjOh9W5kxUmPo6y1ddOYG+jXC9ze6Tz9UuWG/3EhfRO9k2ZzPZbJ96NOrUnfQ396oMwMjazjzoBPXihJVI59wv19pAa8F9PZFx0RfK0pUtSTSVZjnTNkoJZ+o47xSpr4hdHJyhlbyeeRbQq+zTLAFHQJh4kLlpXWieZ9eq6r5hrDvBP10nz69VlXO3i6a6MuU19WheV9meYr0hP5LqFW4XVntodO3Hv2yajY0K+uETd4/BzooDv0rP49bXdTo/f9kcrC/ciEv8QAAAABJRU5ErkJggg=="
}
base64与图片输出屏幕的更多相关文章
- Delphi 读取 c# webservice XML的base64编码图片字符串转化图片并显示
Delphi 读取 c# webservice XML的base64编码图片字符串转化图片并显示 在 开发中遇到应用c#及asp.net的在的webservice 保存图片并以xml文件形式现实出来 ...
- springmvc结合base64存取图片到mysql
简单介绍: 1.jsp通过MultipartFile上传图片到后台 2.后台把上传的图片通过base64转换成字符串存到mysql 3.从mysql读取图片字符串,通过base64反转成byte数组, ...
- base64和图片的转换
/// <summary> /// base64转图片 /// </summary> /// <param name="strBase64">& ...
- 使用IExport进行图片输出出现File creation error
使用IExport进行图片输出(.JPG)时,出现如下异常File creation error. 在ESRI.ArcGIS.Output.ExportJPEGClass.FinishExport ...
- 通过data:image/png;base64把图片直接写在src里
从网上下了个源文件查看时候发现了引用图片的地址不是在本地上的,而是后面跟了一大串字符data:image/png;base64...查了一下资料分析如下: 关于用base64存储图片 网页上有些图片的 ...
- 【PDF单页转化为图片输出 注意:英文或图片类的PDF可转化,中文抛异常】
public static void main(String[] args) throws IOException { /** * PDF单页转化为图片输出 注意:英文或图片类的PDF可转化,中文抛异 ...
- c# API接收Base64转图片
/// <summary> /// API接收Base64转图片 /// </summary> /// <param name="Img">图片 ...
- webpack2.0 css文件引入错误解决及图片输出在根目录配置问题
webpack引入css文件,main.js内容如下 import Vue from 'vue'; import App from './App.vue'; import Mint from 'min ...
- base64加密图片处理
场景:下载html中内嵌的base64加密图片 举个例子,博客园的插入图片有两种方式,一是引用图片链接,二是直接粘贴2进制图片文件.以第二种方式的图片则是以base64加密的方式内嵌在html页面中. ...
随机推荐
- Makefile 与tab
Makefile文件由一系列规则(rules)构成.每条规则的形式如下. <target> : <prerequisites> [tab] <commands> 上 ...
- CF379C-New Year Ratings Change
https://www.luogu.org/problemnew/show/CF379C 一道水题,折腾了我好久! 解题: 先排序,从小到大挨个满足客户,把最终rating放进集合里,判断是否已经给出 ...
- 7-zip命令行详解
一.简介 7z,全称7-Zip, 是一款开源软件.是目前公认的压缩比例最大的压缩解压软件. 主要特征: # 全新的LZMA算法加大了7z格式的压缩比 # 支持格式: * 压缩 / 解压缩:7z, XZ ...
- 关于singer elt 的几篇很不错的文章
以下是链接来自singer 团队的实践,很不错,值得学习 参考连接 https://www.stitchdata.com/blog/100-billion-records-later-refining ...
- 鸿蒙OS与手机系统
鸿蒙发布会上,华为只是说手机端能很快切换到鸿蒙上,但并没有将切换到手机端放到计划表.如果不出意外,手机会是最后用上鸿蒙的终端,尽管它是现在对人们最重要.应用最多.也是人们讨论最多希望鸿蒙迁移到的终端. ...
- centos7安装pure-ftpd
1.获取安装包 .tar.gz && cd pure-ftpd-1.0.47 ./configure --prefix=/usr/local/pureftpd --without-in ...
- word2vector的tensorflow代码实现
import collections import math import os import random import zipfile import numpy as np import urll ...
- svn报错:[Previous operation has not finished; run 'cleanup' if it was interrupted] 的排错过程
今天在打开某一文档的情况下,使用SVN更新文档,在更新的过程中报错,提示需要执行clean up,果断右键执行clean up,又提示一个新的错误:"Previous operation h ...
- http 缓存机制简介
我们应该从两个角度来看http的缓存:缓存控制 和 缓存校验.缓存控制:控制缓存的开关,用于标识请求或访问中是否开启了缓存,使用了什么样的存方式.缓存校验:如何校验缓存,缓存的有效期,如何确定缓存是最 ...
- kubernetes --- weave
#wget 'https://cloud.weave.works/launch/k8s/weavescope.yaml?k8s-service-type=NodePort&k8s-versio ...