Slashdot Mirror


Breakthrough In JPEG Compression

Kris_J writes "The makers of the (classic) compression package Stuffit have written a program that can compress JPGs by roughly 30%. This isn't the raw image to JPG compression, this is lossless compression applied to the JPG file. Typical compression rates for JPGs are 2% to -1%. If you read the whitepaper (PDF), they are even proposing a new image format; StuffIt Image Format (SIF). Now I just need someone to write a SIF compressor for my old Kodak DC260."

30 of 648 comments (clear)

  1. Fractal image format by nmg196 · · Score: 5, Interesting

    I would have thought that rather than 'zipping' an existing image format to create a new one just to save 30%, they'd be better off improving the original image compression algorithm or coming up with a new one.

    Quite a while ago (years!) I had a program which could compress images into a fractal image format. It was amazing - the files were much smaller than JPEGs but looked a lot better. The only drawback was that it took ages to compress the images. But with the extra CPU horsepower we have today I'm surprised fractal image compression hasn't become more prevailant. It would still probably be useless for digital cameras though as it would probably be impossible to implement the compression in hardware/firmware such that it could compress a 6+ megapixel image within the requisit 1-2 seconds.

    Does anyone know what happened to fractal image format files (.fif) and why they never took off?

    1. Re:Fractal image format by qualico · · Score: 2, Interesting

      So that would be the ticket for .fif.
      Optimized hardware, specifically designed to run .fif algorithms?

      I'd love to see something like this in a camera.
      No doubt future Mars rovers would benefit from smaller download sizes?

    2. Re:Fractal image format by JanneM · · Score: 2, Interesting

      ``If I remember correctly, that is still under patent. Until they expire, the format will be a nonstarter.''

      You mean like GIF and MPEG and MP3 and probably this new scheme?


      I should have elaborated. I remember when this was first written about. It was pretty amazing, but the inventors were charging for the right to implement a decoder, and (at least in the beginning) would not even let others to encode at all; the business model was apparently that you'd send them the images and they'd encode it for you.

      Even without that last bit of stupidity, the fact that you needed to pay to implement a decoder meant that nobody did, since there was no images to decode anyway. And not many would want to encode in a format that nobody could read since they didn't have a decoder.

      --
      Trust the Computer. The Computer is your friend.
    3. Re:Fractal image format by fyngyrz · · Score: 2, Interesting
      FWIW, GIF is a far different situation; Unisys played bait-and-switch such that the developer community was widely using the format before they became aware it was encumbered.

      Fractal image compression was initially closely held, agressively marketed to developers (including us) for considerable bucks, and failed to make inroads in that venue. Now we'll have to wait for the patents to expire to consider it again -- it's been around for years and has gone literally nowhere, so I think the grandparent post had it pretty much spot-on.

      --
      I've fallen off your lawn, and I can't get up.
    4. Re:Fractal image format by imsabbel · · Score: 3, Interesting

      Believe him, i used the same programm. It was from iterated systems (they are long gone).
      Its not on their homepage anymore. I dont know if they really used IFS or they just did some wavelets and faked it, but the compression was honestly much better than jpeg. (but of course slower, too. IIRC, compressing a 1024x786 picture took about 40-50 seconds on my pentium.
      What was unique was the viewer. it was "resolutionless", so you could zoom in farther than the original without pixelation. Shapes started to look painterly then, as if traced by outlines, which would actually be in favour of it really being a fractal compressor.
      No idea why it was canned.

      --
      HI O WISE PRINCE. WHT TOOK U SO DAM LONG?
    5. Re:Fractal image format by Anonymous Coward · · Score: 3, Interesting

      Does anyone know what happened to fractal image format files (.fif) and why they never took off?

      Hard to implement. Patent mess. CPU requirements. No better fidelity [they have just as many artifacts as JPEG, but the artifacts are 'nicer looking']. Massive increases in available bandwidth. Fractal wierdness with editing, you always have to convert back to raster anyway.

      The tech has found niche applications though, such as image scaling : Lizardtech's Genuine Fractals is pitched as an image rescaling tool, but it's basically the same tech as you're talking about. In this case, it's just a save/load plugin for photoshop. You save any file as a fractal and then when you reopen it it asks you how big you want it. 200%? 500%? Whatever, it scales it up and looks much the same, but with a strange kind of fractal painting-like effect.

      The strange thing is that if you zoom in on one of these scaled images you start to see shapes that weren't in the original -- that weren't in the original scene, though at normal zoom the image might look perfectly normal. It's kind of creepy.

    6. Re:Fractal image format by dcw3 · · Score: 2, Interesting

      It would still probably be useless for digital cameras though as it would probably be impossible to implement the compression in hardware/firmware such that it could compress a 6+ megapixel image within the requisit 1-2 seconds.

      Why must we have it in 1-2 seconds? You could implement this a couple of ways without impacting the need for quick back to back shots. 1.) A compression button (menu option, or some such), allowing the owner to do a manual compress when running low on space. 2.) Do it automatically, but if the owner snaps another photo, then interrupt the compress until later...sort of a background compression.

      --
      Just another day in Paradise
    7. Re:Fractal image format by happyhippy · · Score: 2, Interesting
      Well the fractal decompression I was using was mere seconds. I think all forms of it are, seeing that the compressed file is just a list of transformations of whatever groups of pixels that were stored with it.
      Its the deciding on what groups of pixels to store thats the problem, and that took an hour per machine on a 300MHz pentium 2.

      A rough fractal compression algorithm is this:
      1. Divide the pic up into subsets of itself, or pixel blocks. Simply Half it, quarter it, eighth it etc, down to 2x2 pixels. This can be varied depending on how quick you want it against loss of potential compression, for instance you can stop at 'eighths' and do the rest of the algorithm on just these. It would be very fast but the compression wont be that great.
      2. Now for each pixel block, compare it with every other one to see if they roughly match given a set lossy tolerence (another variable you decide in advance).
      3. If blocks match, store the smaller block if one, and the directions on how to produce the other blocks.
      4. If blocks dont match store the pixels.

      Now this is a simplified algor, but you can see in 2 that theres a shitload of block comparisons needed for the best compression of an image. Even more for better search parameters, like rotating each block by 90/180/270 degrees to better pattern match or trying the inverse of blocks which again doubles the comparisons! My 256x256 greyscale test images took an hour, triple that for a RGB image!

    8. Re:Fractal image format by Corpus_Callosum · · Score: 3, Interesting

      I concluded that it isnt practical for general use, it took too much time to compress an image (alright it was five years ago and so today it probably wouldnt matter), but most importantly there is no easy general compression solution for all images (for instance one that compresses tree pics well wont do faces well and vice versa).

      I did some basic expirementation with Genetic Algorithms and fractal compression and I can tell you, GA does solve the problem. Not only solve it, but obliterates it. With GA, fractal compression can achieve compression ratios and quality that are unheard of with other techniques.

      Of course, this is to be expected, after all - it is what nature does with us. Our genecode is the compressed image, our bodies are the uncompressed results.

      Interesting thought food, huh...

      --
      The reason that it can be true that 1+1 > 2 is that very peculiar nonzero value of the + operator
  2. What's the point? by CliffSpradlin · · Score: 5, Interesting

    The linked page shows average decompression times of 6-8 seconds for 600-800 KB files, rising with the size of the file. Who would benefit from this? It's obviously too slow to speed up web pages, and would be far too CPU intensive for consumer cameras. Professional photographers would have no use for this since they would use RAW images.

    I mean, it's cool and all to be able to compress JPGs by that much more, but the size gains are negated by the time it takes to decompress them. This seems just like those super high compression algorithms that have rather amazing compression rates, but take -forever- to compress or decompress, making them unusable. The difference is those are obviously and labeled as simply for scientific research into compression, but Aladdin seems to be trying to market this product for public consumption. The listed uses ( http://www.stuffit.com/imagecompression/ ) seem trivial at best.

    Who's gonna be buying this?

    -Cliff Spradlin

  3. Questions by RAMMS+EIN · · Score: 4, Interesting

    The linked page did not answer some of my questions:

    1. Does this only work for JPEG, or also for other (compressed or plain) files?

    2a. If it only works for JPEG, why?

    2b. If it works for others, how well?

    Anybody who can answer these?

    --
    Please correct me if I got my facts wrong.
    1. Re:Questions by ottffssent · · Score: 4, Interesting

      The whitepaper suggests they're tearing out the run-length encoding that's the final step in jpeg and replacing it with something more space-efficient.

      In a nutshell, JPEG works like:

      Original image data -> frequency domain -> high frequencies truncated (via division matrix) -> RLE

      RLE is fast, but not terribly compact. Replacing it with something better improves compression. However, RLE generates not-very-compressable output, which is why traditional compression software does poorly. I imagine if you took a jpeg, undid the RLE, and zip compressed the result, you'd get something close to what the stuffit folk are claiming. If someone wants to try that, I'd be interested in the results.

    2. Re:Questions by imsabbel · · Score: 2, Interesting

      only that jpegs dont use RLE for encoding the koefficient data, but also a high level compression algorithm. Im not sure if its huffman, but something comareable. NO RLE.
      Thats the reason zip failes: its like zipping a zip. And try using rar on a zip compared to unzipping and raring the contends of the zip.

      --
      HI O WISE PRINCE. WHT TOOK U SO DAM LONG?
  4. Um by Anonymous Coward · · Score: 2, Interesting

    Stuffit repackages its expensive compression software every year (it seems). Now I would be happy to admit my mistake, but their main area of expertise seems to be marketing. Not technology. I reckon JPEG2000 or any number of other newer-than-JPEG formats already exceed whatever Stuffit purports to have accomplished. I suspect they are trying to tie their name to JPEG as a marketing gimmick to win hearts and minds. I doubt this is worth a mention on Slashdot.

    We don't need any new standards unless they actually offer an improvement over recent technology. In technology years, JPEG is very old. A replacement for it should do better than 30% and offer other advantages. I suspect a company that actually specializes in imaging might have come up with a better solution a while ago.

  5. DV Video? by patniemeyer · · Score: 2, Interesting

    Would this technique apply to DV video?

  6. Wow, that IS a breakthrough! by wcitechnologies · · Score: 5, Interesting

    I have a friend who's father is a professional photographer. He has gigabytes and gigabytes of images stored for his customers, should they want to order re-prints. They're thinking about setting up raid terabyte file server. I can certainyl say that this is good news for them!

    --
    Electrons are free; it is moving them that becomes expensive.
  7. Re:Only lossyless by lougarou · · Score: 4, Interesting

    JPEG is (roughly) a discrete cosine transform, followed by a filter on high frequencies, followed by Huffmann encoding (which is lossless). This is probably the Huffmann encoding that they did remove and replace with one of the more efficient compression algorithms, and something that could indeed be much more efficient than simple huffmann encoding. So they still take advantage of all the strengths of JPEG related to the human perception model, but they still gain in compression. Huffmann is great to compress oft-appearing sequences, and is a great general-purpose lossless encoding, but there are other that do a better job of it.

    In other words, you did not understand what they did.

  8. Re:Only lossyless by goneutt · · Score: 2, Interesting

    Okay, I do a bit of metalurgical crystalline micrography, and we keep the images in the raw bitmap format because we can't let ANY data be lost. But we also have gobs of drive space, so a good lossless, non-distorting compression format would be handy.

    --
    Bacardi + slashdot = negative karma.
  9. PNG is lossless by ArbitraryConstant · · Score: 1, Interesting

    The PNG format is lossless, and very widely deployed (pretty much all browsers and image programs, etc).

    --
    I rarely criticize things I don't care about.
  10. Bah by Tethys_was_taken · · Score: 2, Interesting

    I thought they had found a method to further compress a JPEG, while still maintaining the original format. i.e. it could still be viewed with a regular JPG viewer. That kind of optimization would've been great, especially if it could be used on webpages, forums etc.

    But this is somewhat disappointing. The compression changes the format, and it must be decompressed to view it. Plus they don't intend on releasing the format, and their proposal for a new filetype which can be read by a "plugin" reeks of incompatibility issues.

  11. Possibly just a rehuff? by tangent3 · · Score: 4, Interesting

    The quantised DCT coefficients of a JPEG image are compressed using a JPEG standard huffman table. From what I've seen, this table is far from optimized even for "the average of the majority" of images out there.

    Ogg Vorbis stores its own huffman table in its own stream. The default encoder uses a table optimized for the general audio you can find out there. There is a utility called "rehuff" (goggle it yourself please) that will calculate and build a huffman table optimized for a particular stream and it seems that on average it reduces an Ogg Vorbis filesize by about 5-10%.

    Building an optimized huffman table for individual JPEGs will probably yield such improved compression rates too. If the original JPEG tables are less optimized than the Ogg Vorbis ones, the reduction will be even higher. But 30% seems a little... optimistic.

  12. I did my final year project on Fractal Compression by happyhippy · · Score: 2, Interesting
    so am probably one of the few to be lucky to delve into the mind warping subject.

    I wont bother going into the details of how it works (go read 'Fractal Image Compression' by Yuval Fisher*) but I concluded that fractal compression wasnt viable as there wasnt a general solution to suit all images. There are about 20 variables that you can decide, which give variable results to the final compressed image.
    And one set of variables would be excellent to compressing pics of trees down 80%, another set of variables would be excellent compressing pics of animals down 80%, but using each others set would only give results equal or worse than normal compression algorithms.
    Another factor at the time, five years ago, was that it took an hour to compress a 256x256 greyscale image on a 300MHz machine. Nowadays that isnt a factor.

    * If anyone has this on ebook please post a link here, Im dying to read this again.

  13. White Paper or Press Release? by DingerX · · Score: 2, Interesting

    Okay, so as near as I can figure out, this is a white paper because:
    It describes a new format .SIF as basically being having everything a jpg does except higher compression.

    Some might think it's a press release, since the "White Paper"'s discussion of the new format is largely limited to the benefits "OEMs" will have in using this (soon-to-be patented) technology, and explaining how it integrates into Allume's fine line of existence and future Digital Lifestyle(tm) products.
    Some might further argue that often press releases will accompany white papers, explain the point for the consuming world, and link to the paper; this "white paper" seems to do exactly that: we are invited to examine a (currently 404'd) page to see the actual data involved.

    To those who think it's a press release, it's not, because:

    It don't say "For Immediate Release"

    Press releases are proofread for grammatical errors, and working links capable of withstanding slashdot-class bandwidth


    And by the way, they don't have a chance. Sure, bandwidth cost means a lot, but for the OEM who might consider adopting this technology, it means a new standard that offers at best 30% improvement (on those little 50kb jpegs we're asked to believe), paying for it, and passing the cost on to the consumer. It may be an improvement, but if you really want to improve your image-heavy website's bandwidth usage, switch to Fractal Image Format. Not only do you reduce the size of the images; you reduce the number of people downloading them. The same for .sif : bandwidth savings will actually be on the order of 98% (30% image size reduction, 97% website traffic savings).

  14. Patents. by xtal · · Score: 4, Interesting

    I worked in this field for awhile, and the liscencing and other issues sent the company I was with running in the other direction. JPEG was good enough, everyone was using it, so JPEG it was.

    Fractal compression is cool.. but encumbered by IP issues. Too bad.

    --
    ..don't panic
  15. Just noticed this... by shreevatsa · · Score: 2, Interesting

    " Typical compression rates for JPGs are 2% to -1%. "
    Does -1% mean that the file actually gets bigger?

  16. PFFHHH by shoma-san · · Score: 2, Interesting

    Big Deal. With broadband ever expanding and storage being relatively cheap and inexpensive, this technology is a waste of time. Hell, I've got a $100 USB drive for X-mas that was a gig...a fucking gig.

  17. Prior art???? by gowen · · Score: 2, Interesting

    If this idea is what's suggested here, ie. instead of

    Image -> DCT -> Truncate spectrum -> RLE encode

    they use

    Image -> DCT -> Truncate spectrum -> some more efficient encode

    it wouldn't surprise me if the JPEG Group discussed alternate compression encodings during the standardisation meetings. In fact, I'd be extremely surprised if the matter was not raised. If it was, it's pretty clear that this patent is not novel in the slightest...

    --
    Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
  18. just another humbug by l3v1 · · Score: 2, Interesting

    You know what ? The breakthrough in JPEG compression was mainly JPEG-2000.

    There had been, was, and has been possible to achieve better compression ratios, and guess what, even in the high times of JPEG we knew that what's inside, it's not the optimal solution. But there were certain aspects which made it stay the way it was, and that was good to be so. The same goes with JPEG-2000. Since the appearance of it there have been many attempts to make it better, and there have been some good results achieved (even I have read and sometimes even reviewed papers dealing with the subject).

    It's really no question whether one can make an X% better compression to JPEG with the same quality (expecially today, when JPEG is so old that every joe and his dog had time to develop better ways). The question is, has it enough practical usability to justify its presence ? Is there a well-justified reason why we should use it ? Does it deliver
    - better compression rates (smaller size with the same objective & subjective quality) ?
    - lower compression times ?
    - compatibility ?
    - is it any better for hardware implementation purposes (same or lower computation times) ?

    If it's just a "better" compression for the compression's own sake and not for our sakes, then this is even less news than me cleaning my room.

    --
    I am putting myself to the fullest possible use, which is all I can think that any conscious entity can ever hope to do.
  19. Somebody mod this up by pclminion · · Score: 2, Interesting
    I was going to post a similar explanation, but this person did it first, and probably better than I could have anyway.

    As another person who has implemented JPEG, I vouch for his accuracy :-)

  20. Re:Only lossyless by pclminion · · Score: 2, Interesting
    JPEG is basically a discrete cosine transform, followed by aggressive quantization of the DCT coefficients -- higher compression levels imply more extreme quantization -- followed by Huffman or arithmetic coding of the quantized coefficients.

    It is this last step which is not particularly efficient. There are several reasons why ZIP cannot significantly compress this data. First, ZIP is a byte-oriented compressor. Huffman codes are bit-oriented. This causes ZIP to miss many patterns that could be backreferenced simply because they fall on a weird bit position. Second, data can be highly compressible and yet have no repetitive patterns in it.

    For example, consider the sequence 1,2,3,4,5,6,7,8,9,10,...,1000. It has no repeating pattern, but it would be absurd to claim that it cannot be compressed. In this case, applying the simple transform x[i] --> x[i+1] - x[i] transforms the sequence to all zeros, and that is trivially compressible. To decompress, just apply the inverse transform.

    ZIP is too naive to use any sort of transforms. It really was only intended for textual data, program executables, etc.