From Fedora Project Wiki
Line 18: Line 18:
0x00, 0x00, 0xf8, 0xea, 0x01, 0x00, ...
0x00, 0x00, 0xf8, 0xea, 0x01, 0x00, ...
</pre>
</pre>
Hoping to find information to help find an application that could show this source code, I saved it to disk and tried file: <code>bwk.image.c_source:    ASCII text</code>. Seeing this is c source code, I assumed that this was used by directly compiling into a larger c application. What I should have done was attempt to identify the file with:  
Hoping to find information to help find an application that could show this source code, I saved it to disk and tried file: <code>bwk.image.c_source:    ASCII text</code>. Seeing this is c source code, I assumed that this was used by directly compiling into a larger c application. What I could have done was attempt to identify the file with:  
{| ! test !! result
{|  
|- |ffprobe|bwk.image.c_source: Invalid data found when processing input
! test
|- |gimp|bwk.image.c_source' failed: Unknown file type
! result
|- |imageinfo|XBM  X Windows system bitmap (black and white)  1850  8    48x48
|-
|ffprobe
|bwk.image.c_source: Invalid data found when processing input
|-
|gimp
|bwk.image.c_source' failed: Unknown file type
|-
|imageinfo
|XBM  X Windows system bitmap (black and white)  1850  8    48x48
using: imageinfo --format  --fmtdscr  --size --depth --geom  bwk.image.c_source
using: imageinfo --format  --fmtdscr  --size --depth --geom  bwk.image.c_source
|- |imagemagick identify| XBM 48x48 48x48+0+0 8-bit sRGB 2c 1.85KB 0.000u 0:00.000
|-
|imagemagick identify
| XBM 48x48 48x48+0+0 8-bit sRGB 2c 1.85KB 0.000u 0:00.000
|}
|}

Revision as of 07:55, 28 December 2016

X BitMaps: extract image data and display in ascii terminal

Intro

While being distracted from my previous distractions from an earlier distraction (fonts), I was intrigued by: [Great 202 Jailbreak - Computerphile]

The report [a Summer Vacation: Digital Restoration and Typesetter Forensics] included a link to [archive made available of Martin W. Guy's backup to tape from the 80s], where the authors found some data they used either directly or to confirm their earlier guesses about construction of the document. This appears to have taken about 6-8 weeks of work to rebuild one printed report from various information they were able to find or still had in hand. But I digress.

Within the archive index was images described as: Mike Hawleys's collection of tiny X bitmaps (Dec 1988) Including: [Brian Kernighan].

Unknown image type

After clicking the extension-less file I saw:

#define bwk_width 48
#define bwk_height 48
static char bwk_bits[] = {
0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00, 
0x00, 0x00, 0xf8, 0xea, 0x01, 0x00, ...

Hoping to find information to help find an application that could show this source code, I saved it to disk and tried file: bwk.image.c_source: ASCII text. Seeing this is c source code, I assumed that this was used by directly compiling into a larger c application. What I could have done was attempt to identify the file with:

test result
ffprobe bwk.image.c_source: Invalid data found when processing input
gimp bwk.image.c_source' failed: Unknown file type
imageinfo XBM X Windows system bitmap (black and white) 1850 8 48x48

using: imageinfo --format --fmtdscr --size --depth --geom bwk.image.c_source

imagemagick identify XBM 48x48 48x48+0+0 8-bit sRGB 2c 1.85KB 0.000u 0:00.000