下载

https://processing.org/ 上下载最新的linux 64bit版本gzip文件, 当前是 http://download.processing.org/processing-3.3.7-linux64.tgz .

安装

解压后移动到 /opt/ 目录

添加快捷方式

在 /usr/share/applications下新建新文件 processing-pde.desktop, 内容如下

[Desktop Entry]
Version=3.3.
Type=Application
Name=Processing IDE
Icon=/opt/processing-3.3./lib/icons/pde-.png
Exec=/opt/processing-3.3./processing
Comment=Processing IDE
Categories=Development;IDE;
Terminal=false

附: 用于从图片中提取LCD单色数组的代码

// THIS IS NOT ARDUINO CODE!  Runs in Processing IDE (www.processing.org).
// Convert image to C header file suitable for the Adafruit_Thermal library. void setup() {
// Select and load image
selectInput("Select image file to convert:", "processImage");
} void processImage(File image) {
String filename, basename;
PImage img;
PrintWriter output;
int pixelNum, byteNum, bytesOnLine = ,
x, y, b, rowBytes, totalBytes, lastBit, sum;
println("Loading image...");
filename = image.getPath();
img = loadImage(image.getPath()); // Morph filename into output filename and base name for data
x = filename.lastIndexOf('.');
if(x > ) filename = filename.substring(, x); // Strip current extension
x = filename.lastIndexOf('/');
if(x > ) basename = filename.substring(x + ); // Strip path
else basename = filename;
filename += ".h"; // Append '.h' to output filename
println("Writing output to " + filename); // Calculate output size
rowBytes = (img.width + ) / ;
totalBytes = rowBytes * img.height;
// Convert image to B&W, make pixels readable
img.filter(THRESHOLD);
img.loadPixels(); // Open header file for output (NOTE: WILL CLOBBER EXISTING .H FILE, if any)
output = createWriter(filename); // Write image dimensions and beginning of array
output.println("#ifndef _" + basename + "_h_");
output.println("#define _" + basename + "_h_");
output.println();
output.println("#define " + basename + "_width " + img.width);
output.println("#define " + basename + "_height " + img.height);
output.println();
output.print("static const uint8_t PROGMEM " + basename + "_data[] = {"); // Generate body of array
for(pixelNum=byteNum=y=; y<img.height; y++) { // Each row...
for(x=; x<rowBytes; x++) { // Each 8-pixel block within row...
lastBit = (x < rowBytes - ) ? : ( << (rowBytes * - img.width));
sum = ; // Clear accumulated 8 bits
for(b=; b>=lastBit; b >>= ) { // Each pixel within block...
if((img.pixels[pixelNum++] & ) == ) sum |= b; // If black pixel, set bit
}
if(++bytesOnLine >= ) { // Wrap nicely
output.print("\n ");
bytesOnLine = ;
}
output.format(" 0x%02X", sum); // Write accumulated bits
if(++byteNum < totalBytes) output.print(',');
}
} // End array, close file, exit program
output.println();
output.println("};");
output.println();
output.println("#endif // _" + basename + "_h_");
output.flush();
output.close();
println("Done!");
exit();
}

.

Ubuntu16.04 安装Processing的更多相关文章

  1. Ubuntu16.04安装Redis并配置

    Ubuntu16.04安装Redis并配置 2018年05月22日 10:40:35 Hello_刘 阅读数:29146   Ubuntu16.04安装Redis并配置 1):安装: 1:终端命令下载 ...

  2. ubuntu16.04安装jdk,tomcat

    ubuntu16.04安装jdk,tomcat 最近装了一下tomcat,网上的教程很多,我也试了很多次,但是有一些教程关于tomcat配置是错误的,让我走上了歧途.差点重装系统,还好王总及时出手帮助 ...

  3. Ubuntu16.04 安装openjdk-7-jdk

    Ubuntu16.04 安装openjdk-7-jdk sudo apt-get install openjdk-7-jre 或者sudo apt-get install openjdk-7-jdk ...

  4. Ubuntu16.04安装GTK3主题:OSX-Arc

    Ubuntu16.04安装GTK3主题:OSX-Arc GTK3主题:OSX-Arc描述: 前几个月,Gnome3.20升3.22的时候,出现了大量主题崩溃的现象,其中包括Arc.Flatabulou ...

  5. Ubuntu16.04安装opencv for python/c++

    Ubuntu16.04安装opencv for python/c++ 网上关于opencv的安装已经有了不少资料,但是没有一篇资料能让我一次性安装成功,因此花费了大量时间去解决各种意外,希望这篇能给一 ...

  6. ubuntu16.04安装不上有道词典的解决办法

    转自:http://www.linuxdiyf.com/linux/21143.html ubuntu16.04安装不上有道词典,提示: le@hu-pc:~/下载$ sudo dpkg -i you ...

  7. Ubuntu16.04安装mongodb

    Ubuntu16.04安装mongodb copy from: http://blog.csdn.net/zhushh/article/details/52451441 1.导入软件源的公钥 sudo ...

  8. 【Tools】ubuntu16.04安装搜狗输入法

    Ubuntu16,04 安装搜狗输入法 1.下载搜狗输入法的安装包 下载地址为:http://pinyin.sogou.com/linux/ 2.按键Ctr+Alt+T打开终端,输入以下命令切换到下载 ...

  9. Ubuntu16.04安装cuda9.0+cudnn7.0

    Ubuntu16.04安装cuda9.0+cudnn7.0 这篇记录拖了好久,估计是去年6月份就已经安装过几遍,然后一方面因为俺比较懒,一方面后面没有经常在自己电脑上跑算法,比较少装cuda和cudn ...

随机推荐

  1. 用java打暴雪星际争霸(2)——执行測试机器人

    原创内容.转载请注明. 在上一节安装完成后.或者您直接打开我分享的虚拟机后,我如今将解说怎样启动測试机器人. 第一步,打开Eclipse,导入机器人演示样例项目,如图所看到的. 第二步,我们能够看到就 ...

  2. Chart:ECharts

    ylbtech-Chart:ECharts ECharts,一个纯 Javascript 的图表库,可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE8/9/10/11,Chrome, ...

  3. WinCE程序调试方法【转】

    刚刚接触WinCE编程,感觉大部分跟WinForm一样.刚开始的时候,不知道怎么进行断点调试,后来同事告诉我,可以直接连接进行断点调试,一试之下,果然好用,所以拿出来分享一下. 必备工具: Micro ...

  4. C# 简单日志文本输出

    第一种  直接文件IO流写日志文件 using System.IO; public static void WriteLog(string strLog) { string sFilePath=&qu ...

  5. 理解SVG图片标签的viewport、viewBox、preserveAspectRatio缩放

    一.viewport 表示SVG可见区域的大小,或者可以想象成舞台大小,画布大小. <svg width="></svg> 上面的SVG代码定义了一个视区,宽500单 ...

  6. 战斗bug技巧全攻略

    程序员不是有一幅这样的对联吗 上联:一个项目两部电脑三餐盒饭只为四千工资搞得五脏俱损六神无主仍然七点起床八点开会处理九个漏洞十分辛苦: 下联:十年编码九年加班八面无光忙的七窍生烟到头六亲不认五体投地依 ...

  7. ios 内存管理总结

    在ios 中 项目有两个内存管理方式 第一种,arc 方式,编译器编译时,自动给obj 加上 release  实现要求 1. 设置项目 将 Objective-C Automatic Referen ...

  8. Kafka:ZK+Kafka+Spark Streaming集群环境搭建(九)安装kafka_2.11-1.1.0

    如何搭建配置centos虚拟机请参考<Kafka:ZK+Kafka+Spark Streaming集群环境搭建(一)VMW安装四台CentOS,并实现本机与它们能交互,虚拟机内部实现可以上网.& ...

  9. 为什么有的需要安全连接的的application只有开Fiddler才好用?

      Help! Running Fiddler Fixes My App??? Over the years, the most interesting class of support reques ...

  10. 10.2.1itools导入不了歌曲

    首先下载iTools 4抢先版,下载地址:http://update2.itools.hk/api/v1/redirect?p=itools4&c=pc_Thinksky 点击电脑桌面左下方“ ...