3 ms·
JPEG is significantly quicker to encode/decode than PNG. Plus I believe there may be a particularly fast route from JPEG XL -> JPEG, as you can go JPEG -> JPEG
by samwillis 4y ago
JPEG is significantly quicker to encode/decode than PNG.
Plus I believe there may be a particularly fast route from JPEG XL -> JPEG, as you can go JPEG -> JPEG XL without having to decode to pixels. That then lets you take advantage of the browser/hardware jpeg decoder.
- Retr0id 4y agoThat fast route would only be possible for a subset of JXLs, though. With control over codec parameters (turning down/off zlib compression), PNG can definitely encode/decode faster (in software). There might be a gap in the market for such an implementation though, perhaps I should make it.
- vanderZwan 4y agoI'm guessing the author suspects the more common first adaptation of JXL will be losslessly re-encoded JPEGs. In other words: the very subset you mention, right? Having said that, the author seems very open to suggestions and contributions - I suggested using canvas instead of a data URL-based PNG a week ago and within a day they had implemented a version of it. edit: the other reason might be having smaller image sizes in the cache.
- pornel 4y agoUncompressed PNG can be quick to encode. There are also dedicated encoders like fpng that are an order of magnitude faster than zlib.