下载

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. 【转】Delphi"配置系统未能初始化"

    好久没用DelphiXE8了,最近打开一看,在启动时报错了“配置系统未能初始化”,在网上一搜,有各种种样的说法,大体上是与.net的Framewok相关,照着一个一个地试了下,还是解决不了这个错误.有 ...

  2. 用css3和jQuery制作精美的表单

    用css3和jQuery制作一个简单的精美表单 html代码如下: <span class="title">Mask Your Input Forms and Make ...

  3. Android -- tools

    工具属性 Android 有一个专用的XML命名空间,用于使工具可以记录XML文件里的信息,并且在打包程序的进行把信息剥离到不会带来运行时期和下载大小的负面影响的程度. 这个命名空间的 URI 是 h ...

  4. Android -- 状态栏高度

    干货 Class<?> c = null; Object obj = null; Field field = null; int x = 0, sbar = 0; try { c = Cl ...

  5. CSS命名规范和规则

    一.命名规则 ).尽量不缩写,除非一看就明白的单词 二.class的命名 (1).red { color: red; } .f60 {color: #f60; } .ff8600{ color: #f ...

  6. Android Migrate Android Code

    近期在更改程序架构的时候,用引用Library的方式实现程序的共享化过程中发现R.id.xx的文件不能够在  switch cases  中使用 看代码提示,如下信息: As of ADT 14, r ...

  7. VC++深入详解-第四章学习心得

    这一章节主要讲解了 简单的绘图 主要是通过一些小的例子让我们学会了VC++的一些基本操作 void CDrawView::OnLButtonDown(UINT nFlags, CPoint point ...

  8. Kafka:ZK+Kafka+Spark Streaming集群环境搭建(二十七):kafka manager安装

    一.kafka-manager简介 为了简化开发者和服务工程师维护Kafka集群的工作,yahoo构建了一个叫做Kafka管理器的基于Web工具,叫做 Kafka Manager.这个管理工具可以很容 ...

  9. Python requests如何将第一个请求得到的 cookie 通过 POST 提交给第二个请求

    #coding=utf-8 import requests import json url_login, url_test = "http://192.168.0.162/login&quo ...

  10. 【指导】SonarQube 部署说明

    转载:https://blog.csdn.net/cuiaamay/article/details/52057091 1,安装 1.1 安装依赖 需要保证Oracle JRE 8 及以上,或者 Ope ...