TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

QOI – The “Quite OK Image Format” for fast, lossless image compression

200 pointsby JeanMoover 3 years ago

13 comments

sreekotayover 3 years ago
If QOI is interesting because of speed, you might take a look at fpng, a recent&#x2F;actively developed png reader&#x2F;writer that is achieving comparable speed&#x2F;compression to QOI, while staying png compliant.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;richgel999&#x2F;fpng" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;richgel999&#x2F;fpng</a><p>Disclaimer: have not actively tried either.
评论 #29666197 未加载
评论 #29668121 未加载
cornstalksover 3 years ago
A couple previous interesting discussions from this past month:<p>- &quot;The QOI File Format Specification&quot; 214 points | 3 days ago | 54 comments: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=29625084" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=29625084</a><p>- &quot;QOI: Lossless Image Compression in O(n) Time&quot; 1057 points | 29 days ago | 293 comments: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=29328750" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=29328750</a>
FullyFunctionalover 3 years ago
Since we are rehashing this for the 3rd (4th?) time, I&#x27;ll repeat mine (and apparently many others) key critique: there is no thought at all to enabling parallel decoding, be it, thread-parallel or SIMD (or both). That makes it very much a past millennium style format that will age very poorly.<p>At the very least, break it into chunks and add an offset directory header. I&#x27;m sure one could do something much better, but it&#x27;s a start.<p>EDIT: typo
评论 #29666929 未加载
评论 #29667728 未加载
评论 #29667428 未加载
throwamonover 3 years ago
Didn&#x27;t HN disallow recent reposts? This (or its spec) was already posted 3 days ago (twice) and then 2 days ago...<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=29625084" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=29625084</a><p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=29631717" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=29631717</a><p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=29643370" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=29643370</a>
评论 #29670720 未加载
评论 #29668084 未加载
corysamaover 3 years ago
I think QOI inspired the creation of <a href="https:&#x2F;&#x2F;github.com&#x2F;richgel999&#x2F;fpng" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;richgel999&#x2F;fpng</a> which creates standard PNGs and compares itself directly to QOI.
phoboslabover 3 years ago
Don&#x27;t expect too much of QOI.<p>I wanted a simple format that allows you to load&#x2F;save images quickly, without dealing with the complexity of JPEG or PNG. Even BMP, TIFF and other &quot;legacy&quot; formats are way more complicated to handle when you start looking into it. So that&#x27;s what QOI aims to replace.<p>There&#x27;s a lot of research for a successor format ongoing. Block based encoding, conversion to YUV, more OP-types etc. have all shown improved numbers. Better support for metadata, different bit-depths and allowing restarts (multithreading) is also high on the list of things to implement.<p>But QOI will stay as it is. It&#x27;s the lowest of all hanging fruits that&#x27;s not rotten on the ground.
评论 #29671481 未加载
评论 #29668071 未加载
petitg1987over 3 years ago
I just implemented this format in my game engine and the performances are crazy: images loading is 3.2 times faster (compared to png) and 40 times faster to generate game screenshot!
评论 #29668278 未加载
zigzag312over 3 years ago
Is there any open source audio compression format like that? Lossless and very fast. I haven&#x27;t found any yet.<p>EDIT: I&#x27;m thinking about a format that would be suitable as a replacement for uncompressed WAV files in DAWs. Rendered tracks often have large sections of silence and uncompressed WAVs have always seemed wasteful to me.
评论 #29665447 未加载
评论 #29666813 未加载
评论 #29665247 未加载
评论 #29666166 未加载
评论 #29665236 未加载
评论 #29672418 未加载
meltedcapacitorover 3 years ago
It is nice but pity it does not have a &quot;turn right&quot; opcode: start going left, on the turn opcode, continue decoding pixels after turning 90 degrees to the right, until you hit a previously decoded pixel or the wall of the bounding box defined after the first two turns, in which case you turn automatically. The file ends when there&#x27;s nowhere to turn.<p>This would eliminate the need for a header (bloat!) as the end of file is clearly defined, the size is defined after decoding the top and right line (second turn), and it&#x27;s not so sensitive to orientation (a pathological image can compress very differently in portrait vs landscape in line oriented formats). Color profile can be specified in the spec.<p>Also allows skipping altogether some image-wide bands or columns that are of the background color (defined by the first pixel) as you do not need to walk over all the pixels.
评论 #29668020 未加载
booiover 3 years ago
Seems like they benchmarked it against libpng which shows anywhere from 3-5x faster decompression and 30-50x compression. That&#x27;s pretty impressive and even though libpng isn&#x27;t the most performant of the png libraries, it&#x27;s by far the most common.<p>I think the rust png library is ~4x faster than libpng which could erase the decompression advantage but that 50x faster compression speed is extremely impressive.<p>Can anybody tell if there&#x27;s any significant feature differentials that might explain the difference (color space, pixel formats, .. etc)?
评论 #29666136 未加载
aspyctover 3 years ago
I would love to have something to compress the raw files from my camera. They&#x27;re huge, I have to keep a ton of them, and I also need to transmit them over internet for my backup.<p>I tried a few standard compression format, with very little luck.<p>Canon has devised a very smart (slightly lossy) compression format for newer cameras, but there&#x27;s no converter that I know of for my old camera files.<p>So, unless I shell out large amounts of money for a new camera, I&#x27;m stuck sending twice the data over the internet. Talk about pollution...
评论 #29671761 未加载
jaxrtechover 3 years ago
At a previous job was looking at different binary parsing methods. This project looks quite interesting having binary format descriptions in YAML that then can be generated into your language of choice.<p><a href="https:&#x2F;&#x2F;formats.kaitai.io&#x2F;png&#x2F;" rel="nofollow">https:&#x2F;&#x2F;formats.kaitai.io&#x2F;png&#x2F;</a>
jqpabc123over 3 years ago
Interesting format. It would be much more interesting if browsers supported it.
评论 #29666345 未加载
评论 #29666293 未加载
评论 #29672429 未加载