{"id":7951,"date":"2012-10-13T23:35:49","date_gmt":"2012-10-14T03:35:49","guid":{"rendered":"http:\/\/scruss.com\/blog\/?p=7951"},"modified":"2012-10-13T23:35:49","modified_gmt":"2012-10-14T03:35:49","slug":"optar-paper-based-archiving","status":"publish","type":"post","link":"https:\/\/scruss.com\/blog\/2012\/10\/13\/optar-paper-based-archiving\/","title":{"rendered":"optar: paper-based archiving"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7952\" title=\"twibright optar fragment\" src=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2012\/10\/Screen-Shot-2012-10-13-at-20.18.48.jpg\" alt=\"\" width=\"400\" height=\"238\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2012\/10\/Screen-Shot-2012-10-13-at-20.18.48.jpg 400w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2012\/10\/Screen-Shot-2012-10-13-at-20.18.48-160x95.jpg 160w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2012\/10\/Screen-Shot-2012-10-13-at-20.18.48-320x190.jpg 320w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/p>\n<p>I&#8217;ve spent most of the day messing around with <a href=\"http:\/\/ronja.twibright.com\/optar\/\">Twibright Optar<\/a>, a way of creating <em>printed<\/em> archives of binary data that can be scanned back in and restored.\u00c2\u00a0 It looks like it was written as a proof-of-concept, as the only way to change options is to modify the code and recompile. <em>Eppur si muove<\/em>.<\/p>\n<p>To compile the code on OS X, I found I had to change this line in the Makefile from:<\/p>\n<pre>LDFLAGS=-lm<\/pre>\n<p>to<\/p>\n<pre>LDFLAGS=-lm\u00c2\u00a0 `libpng-config --L_opts`<\/pre>\n<p>After trying to print some samples at the default resolution, I had no luck, so for reliability I halved the data density settings in the file <code>optar.h<\/code>:<\/p>\n<pre>#define XCROSSES 33 \/* Number of crosses horizontally *\/\r\n#define YCROSSES 43 \/* Number of crosses vertically *\/<\/pre>\n<p>It&#8217;s quite important that your image prints and scans with a whole number of printer dots to image pixels. This used to be quite easy to do, before the advent of PDF&#8217;s &#8220;Scale to fit&#8221; misfeature, and also printer drivers that do a tonne of work in the background to &#8220;improve&#8221; the image. Add the mismatch between laser printer resolutions (300, 600, 1200 dpi &#8230;) and inkjets (360, 720, 1440 dpi &#8230;), and you&#8217;ve got lots of ways that this can go wrong.<\/p>\n<p>Thankfully, there&#8217;s one common resolution that works across both types of printers. If you output the image at 120 dpi, that&#8217;s 5 laser printer dots at 600 dpi, or six inkjet dots at 720 dpi. And there was peace in the kingdom.<\/p>\n<p>Here&#8217;s a demo, based on this:<\/p>\n<p><iframe loading=\"lazy\" title=\"Michelin commercial theme 1969 &quot;Go Radial,Go Michelin&quot;.\" width=\"500\" height=\"375\" src=\"https:\/\/www.youtube.com\/embed\/48b4OGLoY1g?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>So I took this track (which I used to have as a 7&#8243;, got at a jumble sale in the mid-70s) and converted it to a <em>really<\/em> low quality MPEG-2.5: <a href=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2012\/10\/MichelinJingle8kbit.mp3\">MichelinJingle8kbit<\/a> \u00e2\u20ac\u201d that&#8217;s 175KB for just shy of three minutes of music (which, at this bitrate, sounds like it&#8217;s played through a layer of socks at the bottom of the Marianas Trench, but still).<\/p>\n<p>Passing it through optar (which I wish wouldn&#8217;t produce PGM files; its output is mono) and bundling the pages into a PDF, I get this: <a href=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2012\/10\/optar_mj.pdf\">optar_mj.pdf<\/a> (760KB). Scanning that printout at 600dpi and running the pages through <code>unoptar<\/code>, I got this: <a href=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2012\/10\/optar1_mj.mp3\">optar1_mj.mp3<\/a>. It&#8217;s the same as the input file, except padded with zeros at the end.<\/p>\n<p>Sometimes, the scanning and conversion doesn&#8217;t do so well:<\/p>\n<ul>\n<li><a href=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2012\/10\/mjoptar300dpi.mp3\">mjoptar300dpi.mp3<\/a> \u00e2\u20ac\u201d this is what happens when you scan at too low a resolution.<\/li>\n<li><a href=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2012\/10\/mjx.mp3\">mjx.mp3<\/a> \u00e2\u20ac\u201d I have no idea what went wrong here, but: glitchtastic!<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve spent most of the day messing around with Twibright Optar, a way of creating printed archives of binary data that can be scanned back in and restored.\u00c2\u00a0 It looks like it was written as a proof-of-concept, as the only way to change options is to modify the code and recompile. Eppur si muove. To [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7],"tags":[48,1739,1183,2569,1161,1679,807],"class_list":["post-7951","post","type-post","status-publish","format-standard","hentry","category-computers-suck","tag-archive","tag-data","tag-glitch","tag-optar","tag-paper","tag-print","tag-scan"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pQNZZ-24f","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/7951","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/comments?post=7951"}],"version-history":[{"count":4,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/7951\/revisions"}],"predecessor-version":[{"id":7961,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/7951\/revisions\/7961"}],"wp:attachment":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/media?parent=7951"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/categories?post=7951"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/tags?post=7951"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}