The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: oex on January 23, 2010, 07:31:57 PM

Title: Lossless Compression
Post by: oex on January 23, 2010, 07:31:57 PM
I'm working on some lossless compression routines and looking to at least beat PNG, think I already got that sorted but maybe it's worth a post to see if there are any compression techniques I've missed.... basically I have PNG type methods I think called Huffman and I'm playing with some neural network ideas but I'm still looking at rather large images.... I do have further ideas I plan to try out once nets are finished but wondered if there were any other named methods out there (that arent patented). I did look at http://en.wikipedia.org/wiki/Arithmetic_coding#US_patents_on_arithmetic_coding and it states that:

U.S. Patent 4,122,440 — (IBM) Filed March 4, 1977, Granted 24 October 1978 (Now expired)
but doesnt say others are expired.... I think patents last 20 years from filing?

What is a *good* image compression ratio (compression time is no issue, decompression needs to be 5-10 seconds on a very slow machine tops)
Title: Re: Lossless Compression
Post by: jj2007 on January 23, 2010, 07:49:27 PM
Quote from: oex on January 23, 2010, 07:31:57 PM
What is a *good* image compression ratio

Depends on many factors. One that beats PngOut (http://www.ardfry.com/pngoutwin/), maybe?
Title: Re: Lossless Compression
Post by: oex on January 23, 2010, 09:14:09 PM
That wont be a problem I'm not restricted to PNG algorithms, I did take a quick look at that the other day when it was mentioned and got the impression it was just reordering of normal PNG data to save space but with extra compression time?
Title: Re: Lossless Compression
Post by: jj2007 on January 24, 2010, 03:28:02 AM
Quote from: oex on January 23, 2010, 09:14:09 PM
That wont be a problem I'm not restricted to PNG algorithms, I did take a quick look at that the other day when it was mentioned and got the impression it was just reordering of normal PNG data to save space but with extra compression time?

pngout is kind of slow, which defeats the assumption that it does "only reordering". In any case, if you are heading for a new and better algo, pngs after treatment with pngout are the real target.

But again, it depends on other factors, too. Try converting a jpg to png...
Title: Re: Lossless Compression
Post by: oex on January 25, 2010, 09:35:57 AM
Hi JJ,

JPEG is lossy so this is an issue for me, I have some ideas I'm working on and I'll come back if I'm stuck (most likely lol).... The best link I have for lossless compression is the Hutter prize but they are all GPLy. Thank you I hadnt had a good look at PNGOut I will go back and take another look I had just assumed that for them to be reread for display the methology had to be pretty much the same.

:lol the forum link seems to redirect to GTAgaming.com
Title: Re: Lossless Compression
Post by: jj2007 on January 25, 2010, 12:51:56 PM
Quote from: oex on January 25, 2010, 09:35:57 AM
:lol the forum link seems to redirect to GTAgaming.com

Which link? If your browser takes you to unknown places, you better check C:\WINDOWS\system32\drivers\etc\hosts...!
Title: Re: Lossless Compression
Post by: oex on January 25, 2010, 01:05:32 PM
The forum link on PNGOut.... I dont think it's my end

Actual link displayed: http://jonof.edgenetwork.org/forum/viewforum.php?f=9
Title: Re: Lossless Compression
Post by: dedndave on January 25, 2010, 01:24:25 PM
that's odd - i get:
http://www.ardfry.com/pngoutwin/

the HOSTS file isn't the only way urls may be redirected
i don't mean to stir any pots, but some members of the gaming community may be less than reputable
perhaps you have picked up a nasty
Title: Re: Lossless Compression
Post by: jj2007 on January 25, 2010, 01:26:58 PM
Quote from: oex on January 25, 2010, 01:05:32 PM
The forum link on PNGOut.... I dont think it's my end

Actual link displayed: http://jonof.edgenetwork.org/forum/viewforum.php?f=9

If you mean the one in "One that beats PngOut, maybe?", watch out: I inserted xxxx/www.ardfry.com/pngoutwin/, and that is what I get. If you see something different, it can mean your host file was corrupted by malware, or your provider redirects you for some reason. What do you see in the status line if you hover over the link?
Title: Re: Lossless Compression
Post by: oex on January 25, 2010, 01:35:05 PM
I clicked your link to http://www.ardfry.com/pngoutwin/.... on that page there is a 'Forum' link on the side menu bar:

PNGOUTWin Home
Purchase
Free 30-day trial
Screenshots/Tour
FAQ
Documentation
Version History
Forum

Which in source links to: http://jonof.edgenetwork.org/forum/viewforum.php?f=9

Which directs me to http://www.gtagaming.com

My hosts file is clean this is a serverside issue for the company that owns pngout
Title: Re: Lossless Compression
Post by: dedndave on January 25, 2010, 01:38:00 PM
ohhh - lol
it appears as though they have simply renamed the site, or otherwise transfered control of the forum

http://jonof.edgenetwork.org/

takes you to:

http://www.gtagaming.com/

it appears as though Jonof has another forum at http://www.jonof.id.au/forum/
gtagaming names him as a sponser
Title: Re: Lossless Compression
Post by: BlackVortex on January 29, 2010, 10:32:38 AM
Hello ???

The official author and page of PngOut is here :
http://advsys.net/ken/utils.htm

That PngOutWin is just a super old frontend.
Title: Re: Lossless Compression
Post by: oex on February 05, 2010, 04:43:32 PM
Well I think I've finished the first pass (yeah it took me ages but I've been on other things too).... Compression is about the same as Microsoft Paint PNGs but doesnt use Huffman or Arithmetic coding yet just my special ingredient.... I would be interested in any well compressed PNG postings if anyone has anything exceptional from apps like pngout that I can open in Paint and try and recompress to match, going to try adding some more flavours over the coming months to at least beat the PNG format

Obviously being lossless I will have no chance against JPEG which I assume will be up to 10 times more compressed depending on the quality loss
Title: Re: Lossless Compression
Post by: hutch-- on February 06, 2010, 11:36:01 AM
This is what I got from JJs link. http://www.ardfry.com/pngoutwin/
Title: Re: Lossless Compression
Post by: oex on February 06, 2010, 12:10:39 PM
Unfortunately they dont post any example images especially full color photos to show off their results. My *guess* is that PNG is a format that can be beaten because it has to conform to various OS/Browser/Paint Package implementations for display.... I havent managed to beat it in an acceptable timeframe as yet but want a lossless compression algorithm that does, worse, one that compresses close to jpeg size. Fortunately? :bg I dont give up easily :lol.
Title: Re: Lossless Compression
Post by: dedndave on February 06, 2010, 12:25:05 PM
if you want to beat PNG compression, maybe it would be easier to start with an uncompressed bitmap
from my experience, trying to compress an already-compressed image is not very fruitful
Title: Re: Lossless Compression
Post by: oex on February 06, 2010, 01:12:45 PM
I am I was just looking for compressed images for size comparisons