Bug 1240692 (FLIF)

Implement support for Free Lossless Image Format (FLIF)

NEW
Unassigned

Status

()

P3
major
3 years ago
2 days ago

People

(Reporter: Virtual, Unassigned)

Tracking

({feature, nightly-community})

unspecified
feature, nightly-community
Points:
---
Bug Flags:
firefox-backlog ?

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [gfx-noted], URL)

Decode performance is a weakness of FLIF. See https://github.com/FLIF-hub/FLIF/issues/89
Whiteboard: [gfx-noted]
Will web authors have to upload FLIF for Firefox, JPEG XR for IE/Edge, WebP for Chrome, and JPEG 2000 for Safari? Excellent...
Alias: FLIF
Summary: (FLIF) Implement FLIF (Free Lossless Image Format) support → Implement FLIF (Free Lossless Image Format) support
Summary: Implement FLIF (Free Lossless Image Format) support → Implement support for Free Lossless Image Format (FLIF)

Comment 3

3 years ago
(In reply to Masatoshi Kimura [:emk] from comment #2)
> Will web authors have to upload FLIF for Firefox, JPEG XR for IE/Edge, WebP
> for Chrome, and JPEG 2000 for Safari? Excellent...

Not necessarily... according to information on http://flif.info , FLIF compresses on average ~20% better than any other well known lossless image codec. With savings this big, with the additional bonus of the image format being responsive and progressive by design, there's a good reason for multiple browser vendors to consider implementing this codec.

Comment 4

3 years ago
(In reply to oscarnardone from comment #3)
> (In reply to Masatoshi Kimura [:emk] from comment #2)
> > Will web authors have to upload FLIF for Firefox, JPEG XR for IE/Edge, WebP
> > for Chrome, and JPEG 2000 for Safari? Excellent...
> 
> Not necessarily... according to information on http://flif.info , FLIF
> compresses on average ~20% better than any other well known lossless image
> codec. With savings this big, with the additional bonus of the image format
> being responsive and progressive by design, there's a good reason for
> multiple browser vendors to consider implementing this codec.

There's also good reason for multiple browser vendors to consider implementing webp, but it seems that's not going to happen any time soon
Has Regression Range: --- → irrelevant
Has STR: --- → irrelevant

Comment 5

2 years ago
Should it actually be implemented? If so, may I be given this task?
(In reply to Vitor from comment #5)
> Should it actually be implemented? If so, may I be given this task?

I believe there are still concerns about decode performance.

Comment 7

2 years ago
(In reply to Masatoshi Kimura [:emk] from comment #2)
> Will web authors have to upload FLIF for Firefox, JPEG XR for IE/Edge, WebP
> for Chrome, and JPEG 2000 for Safari? Excellent...

Not necessarily, first off some browsers might become less important over time (not naming any specifically nor any reasons like abandoning most addons, mind you :-)).

* XR was DOA due to lackluster compression and MS knows it, thus no development there and now XT. 
* 2K is complex/slow and high compression wavelets lack the visual "sharpness" of dct blocks.

Which leaves us with WebP, which is fast, has ok lossy and good (pre-processed or 100%) lossless compression. I really do like FLIF, but some of its strengths like no generation loss and high bit depths aren't critical for Internet usage. Plus atm(!) it's slow and compression isn't that revolutionary for general photographic images vs. webp.

That leaves us with FLIF in a browser as a PNG-ish replacement for other image types than photography ... certainly nice to have, but I'm personally using it as a offline format for image editing and adoption for gimp and ps seems more critical to me. Ymmv.

Comment 8

2 years ago
(In reply to oscarnardone from comment #3)
> (In reply to Masatoshi Kimura [:emk] from comment #2)
> > Will web authors have to upload FLIF for Firefox, JPEG XR for IE/Edge, WebP
> > for Chrome, and JPEG 2000 for Safari? Excellent...
> 
> Not necessarily... according to information on http://flif.info , FLIF
> compresses on average ~20% better than any other well known lossless image
> codec. With savings this big, with the additional bonus of the image format
> being responsive and progressive by design, there's a good reason for
> multiple browser vendors to consider implementing this codec.

I don't think it has any chance of widespread support without somehow getting accepted by the IETF, and for that the support of Google might be needed. A lot of convincing needs to happen.

Comment 9

11 months ago
I just loaded the POTD from commons, which is currently:

https://commons.wikimedia.org/wiki/File:Estaci%C3%B3n_Central,_Berl%C3%ADn,_Alemania,_2016-04-21,_DD_43-45_HDR.JPG

I've encoded it with FLIF in the size which was shown on the webpage: 500x284 pixel and with applied ICC profile I converted it via GIMP to PNG.

So converting PNG to FLIF takes 835ms on a Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz.

Decoding on the same machine back to PNG takes 119ms and without that compression overhead of PNG, saving it to '.pam' it takes 81ms.

I don't see any issue with that compressing or decompressing speed.


Furthermore that compression format is very interesting for the web, because of it's ability to decode partitial downloads with lower resolution. Means the same image must just stored once and can be loaded at the right amout for the display size.

It also supports animations with alpha channels and also the ability to store HDR images is a must-have for the next generation image format for the web.

WebP never took off and I don't think it ever will, because of the HUGE generation loss included.

Here is a example how a partital download and lower resolution rendering for thumbnails might look like... keep in mind, this is currently rendered in JavaScript.

https://uprootlabs.github.io/poly-flif/polyflif-sample.html

---

Is there any roadmap, when can we expect a FLIF support in Firefox?
Flags: needinfo?(Virtual)
It's still as "?" value for being included to Firefox backlog, so there is no any roadmap for FLIF support in Firefox unfortunately yet. What's more, please see comment #1 and comment #6.
Flags: needinfo?(Virtual)

Comment 11

10 months ago
Note that the decoder got a significant performance boost last year. https://github.com/FLIF-hub/FLIF/issues/333#issuecomment-297516166

Comment 12

10 months ago
I think that it's benefits - better compression, support of all types pictures, ability to act like preview and full image in one file.
Hope, it will be included in Firefox.
I don't see any reasons for it not to be included into Firefox.
Are there comparisons of decoder performance vs webp?

Comment 14

4 months ago
Will you add it soon?

Comment 15

2 days ago
(In reply to ruben from comment #9)
>
> WebP never took off and I don't think it ever will, because of the HUGE
> generation loss included.
>
> Is there any roadmap, when can we expect a FLIF support in Firefox?
>

Doing biased comparisons doesn't help - the fast webp (do notice the "web" part) is just fine for one-time lossy compression internet usage. That's because webp features a very efficient lossless mode. And webp is backed by Google, who have embedded low-power devices and server power usage in mind. If webp doesn't take off it's because there's still not enough difference/demand vs. the current jpeg/png/gif combination atm.

I do appreciate the effort and compression innovation of flif. And I'd like to see the "one ring to rule them all" format as much as the next web designer or photog. Alas, flif doesn't seem to be the jpeg replacement, but rather handy for offline or png-ish web usage.
You need to log in before you can comment on or make changes to this bug.