java picture_java 生成图片

2种方式

//BufferedImage pictureDest = imageService.makePicture(inv, name, bgPicture);

ImageIO.write(image, "jpg", inv.getResponse().getOutputStream());

BufferedImage image = new BufferedImage(334, 448, BufferedImage.TYPE_3BYTE_BGR);

Graphics gra = image.getGraphics();

BufferedImage bg = ImageIO.read(new URL(bgPicture));

gra.drawImage(bg, 0, 0, null);

gra.setFont(new Font("宋体", Font.PLAIN, 32));

gra.drawString(name, 30, 50);

2

String pictureDir = realPath + "people/nToWeibo/1.jpg";

String webFilePath = "people/real.jpg";

String outputFile = realPath + webFilePath;

ImageInfo info = new ImageInfo(pictureDir);

MagickImage image = new MagickImage(info);

DrawInfo drawinfo = new DrawInfo(new ImageInfo());

drawinfo.setFont(realPath + "people/wqy-zenhei.ttc");

drawinfo.setText("中国人民共和国");

drawinfo.setGeometry("+30+100");

drawinfo.setBorderColor(PixelPacket.queryColorDatabase("black"));

image.annotateImage(drawinfo);

image.setFileName(outputFile);

image.writeImage(new ImageInfo());

image.destroyImages();

return "@:" + webFilePath;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Great Cow BASIC 0.98.02 老朽痴拙汉化版(大母牛BASIC)是一个8位芯片PIC和Atmel AVR微控制器的开放源码的BASIC编辑器。 在项目中还包括 Great Cow Graphical BASIC(大母牛图形化BASIC), 是一个基于GCASIC程序的图形化编辑器. 最新版本是2018年5月,甚至快要接近V1.00 版本!! 添加的新的功能,使Great Cow BASIC具备最简单方便的工具集-这些工具使用有趣和简单,支持超过1000个微控制器。 有关选项请参阅下载部分。那里有一个图形化的IDE 和文本IDE, 有一个编译器和最小的安装-任由你的选择。 功能特点: - 完整融合的 Great Cow BASIC编译器 - 编译器调用可通过bat批文件进行配置 - SynWrite 编辑器 - 语法高亮显示 - 代码折叠 - 子程序/函数列表 - 自动完成 - 上下文相关帮助 (F1) - 多文件选项卡 - 书签 - 双击错误编译产生源代码行 - oneclick组装/编译/闪存单片机 (F5, F6, F7, F8) - 终端由 Br@y ++ - PICpgm 和 WinPicPgm 编程软件。对于其他编程支持PicPgms 配置(pgmifcfg), 请参见 http://www.franksteinberg.de/#Mikrocontroller - 通过从微芯片中添加 pk2cmd 来实现简单的PicKit2支持 - 微芯片IPE自动化工具(...\GCB@Syn\PicKit3\IPE-Pusher.exe) - 编程-软件可通过GUI进行配置Programmer Editor - AVRdude 和 AVRdude-GUI 工具版本: - SynWrite 6.22.2290 - PPS Tool version: 0.0.5.3 - XpressLoade..exe 1.0.5.954.41244 - Putty.exe 0.63.0.0 - Terminal.exe v.19b 2013116b - TinyMultiBootloader+.exe 0.11.1.9 - WinPICgm.exe 1.9.2.5 - PK3 Gui v3.10 - IPE-Pusher.exe 3.1.1.0 - PK2 Gui v2.61.0.0 - PK2Cmd.exe v1.20 - Micronucleus.exe 2.0a4 - avrdudess.exe 2.4.6123.39693 - avrdude.exe v6.3 操作方法: -只需启动 IDE.exe -当Great Cow Basic 打开源文件时,观察工具栏。通过按钮也可尝试右键按钮,访问oneclick命令。 -通过单击工具栏上的 "GCBasic" 自定义编程软件;然后 "编辑编程首选项"。选择 "编程" 选项卡并拖/放 你的编程在上面。 -使用 "编辑..." 按钮调整编程设置。 -如果没有预安装的适合编程, 您可以添加自己的。 -如果有一个bat批处理 "FlashThis.bat"出现在与源文件相同的文件夹中,则此bat批处理文件会闪烁。 这可能对特定项目的闪烁很有用。 请查看主页: http://gcbasic.sourceforge.net 请查看其他下载选项: http://gcbasic.sourceforge.net/download.html 请查看大母牛BASIC帮助: http://gcbasic.sourceforge.net/help/ Great Cow BASIC is an open-source BASIC compiler for 8 bit Microchip PIC and Atmel AVR microcontrollers. Also included in the project is Great Cow Graphical BASIC, an icon based editor for GCBASIC programs. The latest release is May 2018. We are even closer to v1.00 release!! We have added new capabilities that make Great Cow BASIC the easiest tool set available - supporting over 1000's microcontrollers with tools to make this fun and simple. Please see the download section for your options. We have a Graphical IDE and textual IDE, we have just the compiler and we have a minimal install - it is your choice. Please see the homepage here: http://gcbasic.sourceforge.net and also see http://gcbasic.sourceforge.net/download.html for other Great Cow Basic download options. Great Cow BASIC Help http://gcbasic.sourceforge.net/help/

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值