11 ms·
There's JPEG 2000, which is nothing like classic JPEG. It doesn't have the artifacts classic JPEG introduces at sharp edges, so you can read text. It has more c
by Animats 5y ago
There's JPEG 2000, which is nothing like classic JPEG. It doesn't have the artifacts classic JPEG introduces at sharp edges, so you can read text. It has more color depth if you want it. It also doesn't mess up non-color data such as normal maps the way classic JPEG does.
JPEG 2000 is not used much. Decoding is slow, and encoding is slower. The decoders are either buggy or proprietary. It has way too many options internally.
The big users of JPEG 2000 are medical. It has a "lossless" mode, and medical imagery is usually stored lossless because you really don't want compression artifacts in X-rays.
(I've been struggling with JPEG 2000 recently. Second Life and Open Simulator use it for asset storage. Some images won't decompress properly with OpenJPEG, a free decoder. I finally found out why. There's a field used for "personal health information" in JPEG 2000. This is where the patient name and such go in a CAT scan. That feature was added after the original version. Some older images apparently have junk in that field, which causes problems.)
- PostThisTooFast 5y agoFun note: Red Camera ripped off JPEG2000 and of course got a patent on it through the USA's derelict patent office. Now they're extorting any company that wants to do compressed raw recording.
- user-the-name 5y agoJPEG 2000 is ancient. It is nearly as old as JPEG itself, it long since missed it's change to become relevant. Today it is a legacy format and should be mostly ignored. It has its own types of artefacts, which in some cases are even worse for image quality than those of JPEG. JPEG has introduced multiple new formats since JPEG 2000, all of which are better, such as JPEG XR and JPEG XL.
- j16sdiz 5y agoJPEG was designed in 1992 JPEG2000 was designed 1997-2000
- moron4hire 5y agoThe year right now is 2021. So yes, JPEG 2000 is almost as old as JPEG.
- swiley 5y ago>JPEG 2000 is not used much Apple has decided it shouldn't be by not allowing its use on iOS.
- gvb 5y agoSomeone on the internet says Apple iOS does support it: https://davidwalsh.name/how-to-use-jpeg-2000-jp2-for-a-faster-images-on-iphone https://davidwalsh.name/how-to-use-jpeg-2000-jp2-for-a-faste...
- boxerab 5y agoThe issue you are facing with OpenJPEG has nothing to do with PHR, (which isn't actually "personal health information"), but the fact that the library doesn't decode truncated images. The standard is designed for best-effort decoding when there are corrupt or missing packets, but the implementation errors out when it detects this.
- TheDudeMan 5y ago"you really don't want compression artifacts in X-rays" You really don't want compression artifacts in any image, which is why you should set the compression ratio wisely when encoding. I don't see how X-rays are any different.
- marton78 5y agoYou don't want to do anything lossy in any medical product, otherwise you'd have to prove in the certification process that your lossy compression doesn't introduce any risks.
- skywal_l 5y agoFor storing yes but lossy compression can be useful to improve performance of your UI for example, as long as the user knows that the image displayed has been degraded.
- deleted 5y ago[deleted]
- eco 5y agoSure, but you don't normally end up getting an unnecessary biopsy with most other image artifacts.
- clord 5y agosome images manage to communicate in spite of high compression. X-rays are an example of an image where the cost of misinterpretation is very high.
- kragen 5y agoCompression artifacts in X-rays can easily kill people, either by requiring additional unnecessary X-rays (which both delay diagnosis and cause cancer) or by causing erroneous diagnoses; by comparison, the cost of the data storage thus saved is trivial. Compression artifacts in filtered photos of your cute pet turtle for Instagram are much less likely to kill people.
- jacobolus 5y agoOther big users of JPEG 2000 include libraries and archives storing e.g. historic map images.
- Keyframe 5y agoJPEG 2000 is not used much There's one big win though. Digital cinema projectors, in now pretty much all theatres, run DCPs which have movies encoded with it.
- PostThisTooFast 5y agoRed Camera ripped off JPEG2000 to create its codec; now they extort every other camera vendor that wants to do compressed raw, thanks to the bullshit patent they were able to acquire on it.
- JacobiX 5y agoWe used it to compress scanned PDFs, using mixed raster techniques. Since the PDF natively supports JPEG2000 we used it for document background compression and we used JBIG2 for text image compression. The compression ratio was impressive but the document rendering was noticeably slower even with Adobe reader …
- gsich 5y ago>background compression and we used JBIG2 for text image compression Are you aware of the downsides? https://www.dkriesel.com/en/blog/2013/0802_xerox-workcentres_are_switching_written_numbers_when_scanning https://www.dkriesel.com/en/blog/2013/0802_xerox-workcentres... It stands to reason that not only Xerox had problems with JBIG2.
- JacobiX 5y agoThank you for the link, yes we are aware of this particular issue. For our engine we used only lossless mode and using this mode the decompressed binary image is identical to the original so the described problem cannot occur. Nonetheless this limit severely the usefulness of JBIG2.
- aaron-santos 5y agoAdding to the list: ESA's Sentinel 2 products (granules/tiles) in are typically distributed in JPEG2000 format. Anyone working with this imagery has probably experienced all the trouble associated with extracting and transforming it into a more useful format.
- TazeTSchnitzel 5y ago> Second Life and Open Simulator use it for asset storage JPEG2000 is such a cool choice for Second Life. The fact any truncation of a JPEG2000 bitstream is just a lower-resolution version of the image makes for convenient progressive enhancement when loading textures over the network, right? (And Second Life even used JPEG2000 for geometry, sort-of. I guess with the advent of proper mesh support, that may be less common now though.)
- Something1234 5y agoThis is super interesting. Do you have any more details on the use of JPEG2000 for geometry? I would be curious to hear more.
- raphlinus 5y agoSculpted prim. The object was basically a mesh of triangles in a fixed configuration, but the coordinates of the individual vertices were derived from an image (compressed using lossless JPEG2000, as any compression artifacts, not to mention chroma subsampling, would cause really ugly distortion). This was a halfway point between allowing arbitrary meshes and only pre-made object geometries (but with skinnable textures). http://wiki.secondlife.com/wiki/Sculpted_prim http://wiki.secondlife.com/wiki/Sculpted_prim
- astrange 5y agoJPEG itself has that property - you can decode any JPEG at 1/8 the size pretty easily, and progressive scan JPEGs do what you want here. Dedicated texture compression formats would also do this since they use mipmaps, but I don't know if you can stream those.
- muxator 5y agoAnyway, progressive jpeg2000 decoding is more sophisticated than progressive jpeg
- boxerab 5y agoFor JPEG, if image is encoded using resolution progression, then decoder can not decode using quality progression (where image quality improves with each new piece of the image) and vice versa. With JPEG 2000, the decoder can decide which progression it wishes to use at decode time - by resolution, by quality, by component, or by spatial region.
- Sebb767 5y agoWhat's the advantage of JPEG2000 lossless over, say, PNG? Archives will probably be compress later on anyway and using a widely-supported and known format seems far more suited for archival purposes.
- KMag 5y ago> Archives will probably be compress later on anyway What do you mean by this? Zip, 7zip, gzip, zstd, etc. get little to no compression on PNG. JPEG, or JPEG2000. Presumably you mean something other than zipping up directories of images.
- aaron-santos 5y agoJPEG2000 can be more of a data container than an image format. While the downsides are many, there are a few upsides to JPEG2000. Greater bit depth is useful when storing DNs. More than three channels is useful when storing multi-spectral images. Internal tiling is useful when range reading specific parts of an image (obvs more useful when working with very large images). These specifically make JPEG2000 more useful than PNG when working in certain domains. Satellite imagery is one such domain.
- yyyk 5y agoTechnically, PDFs support JPEG 2000 though this isn't widely used.
- userbinator 5y agoThe eBooks on archive.org are probably the most well-known example. They take noticeably longer to display too, which was what lead me to discover that fact.
- acdha 5y agoOpenJPEG has improved the situation a bit but I use JPEG 2000 as a cautionary example. The community had some good selling points but assume that meant inevitability and slacked off on browser compatibility, open source, and even interoperability. For the first decade or so you had to pay something like $1,500 to get a copy of the spec, too. I work in the library/archiving space where people spent years trying to make this happen due to the compression wins, support for a good range of color depths and spaces, and the progressive decoding is perfect for browsing galleries of high-res images before zooming way into the one you wanted. The frictional cost largely canceled that out: people don’t trust unreliable formats and the JP2 files which only opened in one of {Kakadu, Aware, Adobe} and couldn’t be used with any open source tools live long in the memory. Performance in Jasper was wretched … and while the vendors thought that’d boost sales, it seemed far more effective to me at getting people to use other formats instead. These days, if anyone is talking about new image formats the first question is what they’re doing for open source (especially things like ImageMagick which half the world uses) and specifically browsers. A WASM polyfill for <picture> or <img srcset> is really critical because it means people don’t have to transcode everything for a handful of users.
- matheusmoreira 5y agoProprietary stuff just isn't worth it. They erect so many barriers around the format and the specification that it's essentially impossible to get anything done.
- acdha 5y agoThat’s my general conclusion and it’s substantially more so for the library/archive case where long-term stability is so important. It’d be one thing if, say, a game found a format to be so much better when they control the encode and decode sides completely but once that’s not true it really needs a first-class open source implementation to even be considered.
- radarsat1 5y agoThis reminds me of Sony's minidisc technology. Such a cool product for its time but they purposely made it impossible to use and incompatible with everything.
- supernintendo 5y agoIt also seems like support for JPEG 2000 can be hit or miss. I tried to open a .jp2 file I downloaded from the web into GIMP, but it looks all funky. Original image: https://www.fnordware.com/j2k/jp2samples.html https://www.fnordware.com/j2k/jp2samples.html What it looks like in GIMP: https://imgur.com/a/HCNz7ga https://imgur.com/a/HCNz7ga
- ponyfleisch 5y agoAnd iOS Safari shows it as a mostly green mess. After tapping the image to get to the real .j2, in the page itself it’s a png.
- jmrm 5y agoThe same with ImageGlass, my default image viewer software in Windows
- supernintendo 5y agoWow, I just checked and you're right. I find it fascinating that all of this modern software continues to support JPEG 2000 in such a buggy state. Or maybe it's the file itself that's corrupted? I don't know enough about the file format to say.
- savoytruffle 5y agothe file is obviously wrong
- BlackLotus89 5y agoThe file is correct. You can open it in imagemagick (display) to check. Could be a simple problem with the colorspace implementation of gimp or something similar. If you would read the comments you would know what a mess jpeg2000 implementations are
- jasomill 5y ago
- cma 5y agoCarmack's game Rage used JPEG XR I believe.
- lstodd 5y agoEw, and some years ago I almost but not quite entirely rewrote pnglite exactly because med data has to be lossless, mostly grayscale, in tens of megabytes, and JPEG2000 doesn't even approach to cut it. Something like 10-20Mpix lossless grayscale, well, actually approaching good old xray photos. What possesed someone to actually attempt to use JPEG2000 I do not understand.