• Advertisement
Sign in to follow this  

Can a full program be stored in a photo image

This topic is 894 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I figured this was the place to ask.

 

I had an idea, and I supposed people with knowledge in graphics programming and theory could enlighten me. 

 

I had an idea that paper can be repurposed to backup computers. I don't mean printing the source code of a program on paper. What I mean is that the computer can look at an image, and execute the encoded program. Something like barcodes, but with more memory.

 

Barcodes store information. QR codes store information. So I tried to store a paragraph in a QR code, and it was too much to handle. 

 

I was wondering how much data can be stored in a pixel. Could pixels possibly store data other than color, like text? Or could colors represent text in a way? Can colors be converted to text?

 

This idea came about when thinking about a new type of security, which is really an old type of security. Paper.

 

Why paper? I don't really know yet. 

 

Perhaps something like a modern punch code/card system?

 

Any links to good resources on topics that might be of interest to me would be much appreciated. 

Edited by Tutorial Doctor

Share this post


Link to post
Share on other sites
Advertisement

How do you define a pixel?

 

As we all know in a 32 bit image you gave 8bits red, green, blue and alpha. Those could hold 4 byres of data.

 

However if you compress your data using bzip2 or 7zip or similar you can then put it in a qr code. A qr code is one of the more densely packed bar code types with a maximum storage size of 4k. Assuming no compression header somehow, and a 90% compression you could fit about 35k into your qr code. That's more than enough for a reasonably large c++ source file, a small jpeg image, or your entire phones contact list in xml.

 

You can chain the qr codes together into sets and have a program scan vertically and horizontally so you can store your data in 4k compressed blocks. 

 

In theory these would be more robust than magnetic tape and more future proof than a hard disk so long as it's printed on high quality paper with high resilience inks... but quite low capacity. 

 

Can anyone suggest a better approach? 

Edited by braindigitalis

Share this post


Link to post
Share on other sites


I was wondering how much data can be stored in a pixel. Could pixels possibly store data other than color, like text? Or could colors represent text in a way? Can colors be converted to text?

 

Pixels are just data. They can store whatever you want. You could certainly, say, reserve the lowest bit in each R, G or B channels to represent part of your data, with minimal effect on the final image.

 


This idea came about when thinking about a new type of security, which is really an old type of security. Paper.

 

Use the correct term. Security has a very specific context when used in computing, and I don't think that's the usage you're referring to. I think you're talking about backing up data on paper using a printed image.

 

Of course, if you do that, your formerly perfect digital data is now at the mercy of the printing process and the scanning process.

 

Maybe read:

https://en.wikipedia.org/wiki/Digital_watermarking

Share this post


Link to post
Share on other sites

I read that it would take about 9 million punch cards to store 1 gigabyte of date. That would be a good starting base for me.

 

Now suppose that the punch card patterns were stored as pixel patterns on a sheet of paper, and read by a computer. It seems like it's more than possible with DPI adjustments and such.

 

I also ready that punch cards ARE digital storage. No explanation was given as to what that insinuates. 

Share this post


Link to post
Share on other sites

 


I was wondering how much data can be stored in a pixel. Could pixels possibly store data other than color, like text? Or could colors represent text in a way? Can colors be converted to text?

 

Pixels are just data. They can store whatever you want. You could certainly, say, reserve the lowest bit in each R, G or B channels to represent part of your data, with minimal effect on the final image.

 

 

 


This idea came about when thinking about a new type of security, which is really an old type of security. Paper.

 

Use the correct term. Security has a very specific context when used in computing, and I don't think that's the usage you're referring to. I think you're talking about backing up data on paper using a printed image.

 

Of course, if you do that, your formerly perfect digital data is now at the mercy of the printing process and the scanning process.

 

Maybe read:

https://en.wikipedia.org/wiki/Digital_watermarking

 

 

I was thinking of a use case for this type of system, where authentication is determined by a piece of paper, where part of the security layer is that a piece of paper, on which part of the program resides, has to be scanned into the system for the rest of the system to work. 

 

It may be a useless experiment, but I am still wondering about other applications. 

Share this post


Link to post
Share on other sites
There are programs that do this already, for archival purposes and for resiliency against technological advancement.

Things like blue-ray discs aren't necessarily stable over hundreds of thousands of years, nor are magnetically-stored information. Likewise, our computers even on 25 years' time won't like have the interfaces to read the information from them, let alone in 200 years or more.

Paper is low-tech, low-density, but its a safe bet that computers will have image sensors for as long as human beings have eyeballs. That makes optically-retrievable information in the visible color spectrum a good bridge to even far-distant futures.

As I recall, the program could store something approaching 128k with the consumer grade printers of the day (1200dpi or so) and used unmodified printers. I imagine one could do better with a specially-prepared printer or by modifying the firmware/drivers of a standard printer. This gave results that at the time could be retrieved by desktop scanner (consumer level) but today could probably be retrieved at short distances using even your mobile-phone's camera.

It did work more or less like a QR code. You have to have an encoding scheme though -- for example, even if your printer can produce accurately all 24million shades of an rgb888 color value, its impossible to say that another printer will have the same results or that a given image sensor will agree and read back what you thought was written -- the differences are too subtle. You have to make the data more discrete -- a black&white encoding is very discrete but not densely populated with information. You have to find a balance; maybe a few levels of grey are reliably discernible, Fr instance. Then you also want to build in error-correction so that a page can withstand smudging or pieces being damaged or torn (A QR code can still work even with a significant portion missing -- which is also the mechanism that allows the creation of some of the fancier vanity qr codes).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement