图像文件的背叛 (2020) - 一次 GIF 文件生成方法的探索
图像文件的背叛
我最近获得了一系列精美的小型作品,希望它们值得您的高度关注。 虽然我的雇主熟悉您不同寻常的品味,但他们也理解您对隐私的重视——我向您保证,这次展示安排得极其谨慎。
在未经训练的人看来,这些作品可能显得非常相似。 每幅画布都是数字复制的作品,高十像素,宽十像素,并以惊人强烈的蓝色照亮。
对于像您这样一位,嗯,狂热的收藏家来说,毫无疑问,每幅印刷品都具有独特的感觉质,正如艺术家详尽的脚注所阐述的那样。 请,尽情欣赏…
Becoming and Unbecoming. Macintosh Operating System 10.14.6, Preview.App 10.1
在这件作品中,艺术家使用了精心挑选的旧版 Macintosh 操作系统。 桌面壁纸颜色被自定义为完全由所需的蓝色组成,然后使用 Preview 应用程序进行屏幕截图和必要的裁剪。 遗憾的是,Preview 无法将文件保存为 Graphics Interchange Format (GIF)。
Pointillism I. Sublime Text 3.2.2, ImageMagick 7.0.8–59
在这件作品中,艺术家使用 Sublime 文本编辑器,以如下方式手动构建了 Portable PixMap (PPM) 格式的图像:
P3
# width, height, depth
10 10 1
0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1
0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1
0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1
0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1
0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1
0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1
0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1
0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1
0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1
0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1
然后使用 ImageMagick 应用程序将其转换为 GIF 文件:
$ convert ii.ppm ii.gif
Pointillism II. Vim 8.0.1365, FFmpeg 4.1.4
对于这件作品,艺术家再次创建了一个 PPM 图像,这次使用 Vi, Improved 文本编辑器,使源代码具有更微妙、更清晰的效果:
P3
# horizontal, vertical, perchannel
10 10 1
0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1
0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1
0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1
0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1
0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1
0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1
0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1
0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1
0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1
0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1
然后使用 Fast Forward Moving Pictures Expert Group 应用程序生成 GIF:
$ ffmpeg -i iii.ppm iii.gif
Searing Light. Nano 2.0.6, POV-Ray 3.7.0
艺术家使用 Persistence of Vision Raytracer 语言创作了这件作品,并在 Nano’s Another 文本编辑器中编写了以下脚本:
background { rgb <0, 0, 1> }
然后对场景进行光线追踪,如下所示:
$ povray +Iiv.pov +W10 +H10 +Oiv
与上面的 Preview 一样,Persistence of Vision Raytracer 经过有意设计,不支持创建 GIF 文件;输出的是 Portable Network Graphics 文件。
The Cobbler. Sublime Text 3.2.2, as 10.0.1
此图像由 Macintosh Operating System X Mach-O Gnu’s Not Unix-based assembler 组合而成,这是一种用于创建二进制文件的实用程序。 Sublime 文本编辑器再次被用于其中性色调:
.ascii "GIF89a" # magic number
.short 10 # width
.short 10 # height
.byte 0xF0 # 2-entry global color table
.byte 0 # background color index
.byte 0 # 1:1 pixel aspect ratio
.byte 0x00 # color 0: blue
.byte 0x00
.byte 0xFF
.byte 0x00 # color 1: black
.byte 0x00
.byte 0x00
.ascii "," # image descriptor
.long 0 # x/y offsets
.short 10 # width
.short 10 # height
.byte 0 # no local colortable
.byte 0 # minimum LZW code size
.byte 0 # end of frame
.ascii ";" # finish
奇怪的是,该汇编程序的输出以完全无用的标头作为前缀,必须对其进行修剪。 (希望该工具的未来版本能够纠正这种明显的可用性错误!)因此,组合按如下方式进行:
$ as v.s -o assembled.o
$ dd bs=1 skip=208 if=assembled.o of=v.gif
Camera Obscura. oK, iKe, Safari 12.1.2
在这里,艺术家使用了 Interactive K Environment (iKe),这是一种基于深奥的编程语言 K 的工具。 该工具可用于保存程序输出的动画 GIF 图像; 在这种情况下,由 fc:1
指示单个帧。 请注意,iKe 在渲染时会自动将图像中的像素大小加倍。
w:h:5
fc:1
draw:{,(;,"blue";5 5#0)}
Mu. English, Homo Sapiens
对于这项工作,艺术家按如下方式向同事撰写了一封电子邮件:
尊敬的[已编辑],
我祈祷这封信发现您一切安好。
我非常需要您的帮助。 我需要一个不透明的图像文件,格式为 .GIF,
尺寸精确为 10 像素正方形,完全由十六进制 RGB 颜色 #0000FF 组成。
如果您能向我提供这样一个文件作为附件,我将不胜感激。
致以最热烈的问候,
[已编辑]
(附:稍后您会明白的。)
一段时间后,艺术家使用他们的电子邮件客户端保存了最终的印刷品。
A Desperate Agony. VirtualBox 6.0.6, Ubuntu 19.04, GIMP 2.10.20, Shouting
在这里,艺术家构建了一个虚拟机——如果你愿意,可以把它看作是一种计算套娃——运行 Linux 操作系统的 Ubuntu 发行版。 然后,他们继续安装 GIMP 应用程序。 尽管开发人员经常威胁要删除它们,但 GIMP 应用程序(在创作时)具有一些晦涩且不常用的功能,允许创建和操作图像文件。 在经过艰苦的创建之后,该文件随后通过物理通用串行总线大容量存储设备在虚拟机及其主机之间传输。 大容量存储设备事先通过使用 32 位 File Allocation Table 文件系统对其进行格式化并将其标记为 Charon 来准备,以表彰其在世界之间传输艺术品灵魂的作用。
Composition in Blue and Blue. Gnuplot 5.2, Sublime Text 3.2.2
艺术家使用 Gnu’s Not Unix Plotter 生成了此作品,基于以下描述:
set terminal gif size 10,10
set output 'ix.gif'
set margins 0,0,0,0
unset key
unset tics
unset border
unset label
set style rectangle fs border lc rgb 'blue'
set object 1 rectangle from screen 0,0 to screen 1,1 fillcolor rgb 'blue' behind
plot 1 lt rgb 'blue'
特别要注意的是,Gnu’s Not Unix Plotter 的用户可以多么容易地自定义绘图的背景颜色。 然后可以按如下方式渲染绘图描述:
$ gnuplot ix.gp