News for hackers. Stuff that matters.
Re:Shakespeare.txt.jpg: A JPEG compression experiment by rkangel on Monday June 17, 2013 @01:26PM (#5894499)
I'm not sure you should draw any meaning at all from this, whether technical or philosophical. JPEG is an image specific compression format, and works by removing visually insignificant detail. Applying the same system blindly to an unrelated byte-stream and then looking at the before and after isn't meaningful.

Those objections aside, it's a bit silly from a technical point of view - the text was read in as a RAW image format. As I understand it, RAW has to be converted into a bitmap image using a camera specific algorithm, so before he's even started compressing it the data has been munged, the data is then compressed and output as a completely different file format. I'm surprised he got anything recognisable at all.

Putting bitmap type file headers on the text data, then jpeg compressing it, and resaving it as a bitmap (and removing the headers), might produce something slightly more meaningful. I might try it later - curious to find out what Singular Value Decomposition looks like on text.

Actually, could just skip out Photoshop... cracks knuckles and fires up Python

Re:Shakespeare.txt.jpg: A JPEG compression experiment by TheCraiggers on Monday June 17, 2013 @02:33PM (#5894995)
Only some camera manufactures use proprietary RAM format. There is OpenRAW, for instance. And even if he didn't use that, I don't think it would matter, except to the image generated. Text -> mung -> image -> unmung -> text. You should be able to do any format, assuming the conversion opens and saves into the same format.

Anyway, I gathered that the guy was precisely trying to show that lossy compression was a good thing when used in the right manner, and bad in the wrong manner.

But frankly, I don't care if he was making a point or not. It was a funny read, and having books printed of his various outcomes was a thoroughly wasteful, yet funny idea. So I guess even though I didn't learn anything, I was at least entertained.

Re:Shakespeare.txt.jpg: A JPEG compression experiment by zokier on Monday June 17, 2013 @02:01PM (#5894752)
> As I understand it, RAW has to be converted into a bitmap image using a camera specific algorithm, so before he's even started compressing it the data has been munged, the data is then compressed and output as a completely different file format

That depends if you are talking to photographer or photoshop user :)

This is what Photoshops open dialog looks like:

http://i.imgur.com/hUgPckj.png

If you open file as "Camera RAW" then it indeed goes through photographic processing (debayering etc), but if you use "Photoshop RAW" then the opening is essentially lossless.

Re:Shakespeare.txt.jpg: A JPEG compression experiment by spyder on Monday June 17, 2013 @01:47PM (#5894650)
Yea, it would be more interesting if he would have compressed the text with an algorithm that replaces similar sounding letters, using rules like in the SoundEx algorithm.
Re:Shakespeare.txt.jpg: A JPEG compression experiment by TylerE on Monday June 17, 2013 @02:29PM (#5894972)
Or may a zip-style algorithmn, but as the "quality" setting gets lower, unique/low frequency sequences are replaced by the closest common sequence.