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.

FLIF – Free Lossless Image Format

562 pointsby mattiemassabout 9 years ago

31 comments

pornelabout 9 years ago
Everyone loves the &quot;responsive loading&quot; feature, but that&#x27;s not even the novel thing about the format (JPEG 2000 did it even better — 16 years ago)! The novel feature of this format is better entropy coding.<p>FLIF decoder adds interpolation to make incomplete scans look nicer than in PNG, but that&#x27;s a feature of the decoder, not the file format, so there&#x27;s nothing stopping existing PNG decoders from copying that feature.<p>Note that it&#x27;s generally not desirable to have FLIF used on the Web. A decent-quality JPEG will load at full resolution quicker than it takes FLIF to show a half-resolution preview.<p>FLIF is a lossless format, and lossless is a very hard and <i>costly</i> constraint. Images that aren&#x27;t technically lossless, but <i>look lossless</i> to the naked eye can be half the size.<p>e.g. Monkey image from <a href="https:&#x2F;&#x2F;uprootlabs.github.io&#x2F;poly-flif&#x2F;" rel="nofollow">https:&#x2F;&#x2F;uprootlabs.github.io&#x2F;poly-flif&#x2F;</a> is 700KB in FLIF, but 300KB in high-quality JPEG at q=90 without chroma subsampling (i.e. settings good even for text&#x2F;line-art), and this photo looks fine even at 140KB JPEG (80% smaller than FLIF).<p>So you want FLIF for archival, editing and interchange of image originals, but even the best lossless format is a waste of bytes when used for distribution to end users.
评论 #11240120 未加载
评论 #11239401 未加载
评论 #11239524 未加载
评论 #11239582 未加载
评论 #11240632 未加载
评论 #11241598 未加载
评论 #11242565 未加载
teh_klevabout 9 years ago
Do any of these newer&#x2F;experimental schemes, such as this one, take into account other factors such as CPU load before declaring themselves as &quot;better&quot;. For example this project seems pretty cool, but there&#x27;s no data on how CPU bound, memory bound, I&#x2F;O bound its decompression algorithm is.<p>I guess what I&#x27;m asking is, if I hit a web page with 20 images @ 100k per image is it going to nail one or more cores at 100% and drain the battery on my portable device. Fantastic compression is great but what are the trade offs?
评论 #11240225 未加载
评论 #11239180 未加载
评论 #11239143 未加载
sjwrightabout 9 years ago
Incredible work. My only comment is that the progressive loading example reveals that their algorithm seems to have desirable properties for lossy compression as well. Why not make FLIF support lossy and lossless? It&#x27;s hard enough to get a new image format standardized as it is; offering a lossy mode would effectively give us a two-for-one deal.<p>If PNG had a lossy mode that was even slightly better than JPEG (or exactly as good but with full alpha channel support) it would have eventually supplanted JPEG just as it has now supplanted GIF.
评论 #11238726 未加载
p4bl0about 9 years ago
There was a previous discussion on HN about this: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10317790" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10317790</a>
评论 #11238505 未加载
panicabout 9 years ago
This looks promising! They ought to include time-to-decode in the performance numbers, though: a smaller compressed size doesn&#x27;t matter if the process of loading and displaying the image takes more time overall. A graph like the ones on this page would be awesome: <a href="http:&#x2F;&#x2F;cbloomrants.blogspot.com&#x2F;2015&#x2F;03&#x2F;03-02-15-oodle-lz-pareto-frontier.html" rel="nofollow">http:&#x2F;&#x2F;cbloomrants.blogspot.com&#x2F;2015&#x2F;03&#x2F;03-02-15-oodle-lz-pa...</a>
评论 #11238806 未加载
评论 #11240700 未加载
AshleysBrainabout 9 years ago
If browsers supported APIs to allow &quot;native&quot; image&#x2F;video&#x2F;audio codecs to be written in JS, we could support new formats like this without needing any co-operation from the (very conservative) browser vendors. I wrote a proposal for this here: <a href="https:&#x2F;&#x2F;discourse.wicg.io&#x2F;t&#x2F;custom-image-audio-video-codec-apis&#x2F;1270" rel="nofollow">https:&#x2F;&#x2F;discourse.wicg.io&#x2F;t&#x2F;custom-image-audio-video-codec-a...</a>
评论 #11238589 未加载
评论 #11238710 未加载
评论 #11238933 未加载
评论 #11238443 未加载
评论 #11238510 未加载
Zardoz84about 9 years ago
16 bit per channel and on future support for CMYK. Looks like a interesting alternative to TIFF for digital preservation. Sadly, the actual recommended format is TIFF (so, waste of storage space) -&gt; <a href="http:&#x2F;&#x2F;www.loc.gov&#x2F;preservation&#x2F;resources&#x2F;rfs&#x2F;stillimg.html" rel="nofollow">http:&#x2F;&#x2F;www.loc.gov&#x2F;preservation&#x2F;resources&#x2F;rfs&#x2F;stillimg.html</a>
评论 #11238864 未加载
kutkloon7about 9 years ago
Pretty amazing! Particularly nice is that an alpha channel and animation are also possible.<p>One critical sidenode: it seems FLIF is still not as good as JPEG when used as lossy compression (this is something the benchmarks do not show well).<p>For example, go to <a href="http:&#x2F;&#x2F;uprootlabs.github.io&#x2F;poly-flif&#x2F;" rel="nofollow">http:&#x2F;&#x2F;uprootlabs.github.io&#x2F;poly-flif&#x2F;</a>, choose the monkey image, choose &#x27;comparing with same size JPG&#x27;, and set truncation to 60% or more.<p>Also, I&#x27;m not sure how efficient en- and decoding is for FLIF.
评论 #11238994 未加载
orlybabout 9 years ago
FLIF really is awesome :) Here&#x27;s an analysis that compares FLIF to other common lossless image formats such as: PNG, WebP and BPG. <a href="http:&#x2F;&#x2F;cloudinary.com&#x2F;blog&#x2F;flif_the_new_lossless_image_format_that_outperforms_png_webp_and_bpg" rel="nofollow">http:&#x2F;&#x2F;cloudinary.com&#x2F;blog&#x2F;flif_the_new_lossless_image_forma...</a>
thenomadabout 9 years ago
Hmm, this has real potential as an archiving format for video, too.<p>Any news on what the processing overhead is like for viewing rather than creating the files? Is it less than PNG?
matzipanabout 9 years ago
Does anybody understand how lossless JPEG works? To my mind, the whole point of JPEG is to get rid of high-frequency components.
评论 #11238496 未加载
评论 #11238986 未加载
mrobabout 9 years ago
I&#x27;d like to see some comparisons with palettized PNGs. All the demo images for poly-flif use more than 256 colors, but diagrams and line art sometimes use 256 colors or less, which means they can be stored in an 8-bit palettized PNG losslessly. People often forget about this when optimizing PNG sizes, and most graphics software saves as RGB by default even when the image will fit in 8-bit palettized.
评论 #11246290 未加载
tomtheguvnorabout 9 years ago
Apparently it relies on a novel new &quot;middle out&quot; compression algorithm.
评论 #11239240 未加载
r0m4n0about 9 years ago
Seems cool. Slightly off topic but I hate when someone names a file format with &quot;format&quot; or &quot;file&quot; in the name. Isn&#x27;t it a bit redundant to include format in the format? Something that has always bothered me about PDF.
ekianjoabout 9 years ago
Thanks Jon for your work on this!
gsmethellsabout 9 years ago
When is this going to be available for DICOM medical images? :)<p><a href="http:&#x2F;&#x2F;dicom.nema.org" rel="nofollow">http:&#x2F;&#x2F;dicom.nema.org</a>
wmuabout 9 years ago
Looks amazing! Really impressive results. Very cool that progressive loading is composed into the format.<p>However I am afraid that without support from biggest companies the format will never gain popularity. Just think how long it took to make PNG a web standard. And animated PNGs? Died unnoticed. To make things worse, GIF, a stinking leftover from &#x27;90, is still in use (even on HN!).
cyborgx7about 9 years ago
Looks neat, but recently I discovered farbfeld[1] and I think I&#x27;ll be sticking with that for the time being. I&#x27;m starting to believe data-specific compression algorithms are the wrong way to go.<p>[1]<a href="http:&#x2F;&#x2F;tools.suckless.org&#x2F;farbfeld&#x2F;" rel="nofollow">http:&#x2F;&#x2F;tools.suckless.org&#x2F;farbfeld&#x2F;</a>
mitchtbaumabout 9 years ago
For browser support (Servo), FLIF has an issue pointing to Rust&#x27;s common image library: <a href="https:&#x2F;&#x2F;github.com&#x2F;FLIF-hub&#x2F;FLIF&#x2F;issues&#x2F;142" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;FLIF-hub&#x2F;FLIF&#x2F;issues&#x2F;142</a>
评论 #11241060 未加载
ipunchghostsabout 9 years ago
This is probably the 3rd &quot;replacement&quot; for JPEG I have seen on HN in the last few years. None of these formats have been supported by common browsers. When will this stuff start making its way to the desktop?
评论 #11239594 未加载
matheweisabout 9 years ago
I&#x27;m curious about patent&#x2F; licensing restrictions.<p>From what I gather it is patent free and the implementation is GPLv3?<p>Does this mean someone else could make a compatible encoder&#x2F;decoder with a less restrictive license?
评论 #11239445 未加载
thebeardisredabout 9 years ago
Kudos on this @jonsneyers! I&#x27;ve been looking at it ever since we talked at FOSDEM. Glad to see you getting some press on the work and good luck with Uproot Labs!
评论 #11246326 未加载
fsiefkenabout 9 years ago
Impressive benchmarks, but how would this compare to lossless VP9, VP10 or h264, h265 image compression?
eddiehabout 9 years ago
Honest question. Seriously not trying to dismiss the work.<p>Why not TIFF? 30 years old, already built into nearly every graphics application, supports everything this proposes and more. Plus it is already supported in Safari.<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Tagged_Image_File_Format" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Tagged_Image_File_Format</a>
评论 #11238872 未加载
评论 #11238716 未加载
评论 #11238687 未加载
评论 #11238700 未加载
IgorPartolaabout 9 years ago
Awesome! So when can I have it in browsers?
thealistraabout 9 years ago
Encoding and decoding speeds are acceptable, but should be improved
评论 #11238708 未加载
aheekiabout 9 years ago
hello pied piper
mattybrennanabout 9 years ago
But what&#x27;s the Weissman score?
chris_wotabout 9 years ago
I wonder if IE will adopt it? Firefox and Chrome are very responsive, Microsoft not so much.
评论 #11238497 未加载
评论 #11238446 未加载
评论 #11238495 未加载
gr3yh47about 9 years ago
relevant xkcd: <a href="https:&#x2F;&#x2F;xkcd.com&#x2F;927&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xkcd.com&#x2F;927&#x2F;</a>
praeivisabout 9 years ago
<a href="https:&#x2F;&#x2F;xkcd.com&#x2F;927&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xkcd.com&#x2F;927&#x2F;</a>