Re:Show HN: JXL.js – JPEG XL Decoder in JavaScript Using Web...
by samwillis on Tuesday November 22, 2022 @08:48AM
(#33705703)
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.
Re:Show HN: JXL.js – JPEG XL Decoder in JavaScript Using Web...
by Retr0id on Tuesday November 22, 2022 @09:03AM
(#33705860)
That 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.
Re:Show HN: JXL.js – JPEG XL Decoder in JavaScript Using Web...
by vanderZwan on Tuesday November 22, 2022 @09:31AM
(#33706168)
I'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.
Re:Show HN: JXL.js – JPEG XL Decoder in JavaScript Using Web...
by pornel on Tuesday November 22, 2022 @11:29AM
(#33707548)
Uncompressed PNG can be quick to encode. There are also dedicated encoders like fpng that are an order of magnitude faster than zlib.
Re:Show HN: JXL.js – JPEG XL Decoder in JavaScript Using Web...
by DaleCurtis on Tuesday November 22, 2022 @11:19AM
(#33707425)
I think you can skip the transcode step entirely in favor of transmux with BMP too.
Why not PNG?