Live data from Hacker News

Image file formats that didn’t make it

tedium.co

111–120 of 210 posts

Re: Image file formats that didn’t make it

#111
post #84

JPEG2000 is a big one that seems to be missing. It is used in medical imaging or something, because laws? But its visual quality is worse than old JPEG, despite a PSNR advantage. Apparently, compression researchers used to think that people care about PSNR.

I think many of those proprietary wavelet compression formats seem to be missing. I remember that at around 2000 I recompressed my images every other week after finding yet another file format that could save me some disk space. Cannot even remember their names...

JPEG2000 is not even proprietary (being from JPEG and all), it failed anyway. Of course, the patent situation may have been a problem.

Re: Image file formats that didn’t make it

#112
post #95

Earlier quoted context omitted.

It also used to form the basis for Redcode, the file format used by RED digital cinema cameras. Not sure if the current version is still based on JPEG2000 though.

AFAIK, digital cinema packages (DCP) used for shipping movies to theaters and showing them on digital projectors are still based on JPEG2000 image sequences.

Is there a reason h264 wasn't used? It has been widely available since at least 2006 and supports all kinds of resolutions, etc.

Re: Image file formats that didn’t make it

#113
post #24

The Amiga (EA) IFF format was adopted by Microsoft as RIFF (essentially the same format but with little-endian numbers for x86), which is the basis of WAV and AVI, among others.

IFF (Interchangeable File Format) is a container format that can contain different types of data. ILBM (InterLeaved BitMap) was the image encoding inside the IFF.

The Amiga had bitplane-based graphics. The "interleaved" part was that an image was stored by line first, bitplanes second instead of one whole bitplane after the other. Games often used the "interleaved" graphics layout in memory because it allowed blitting a sprite with a single Blitter operation. (... and EA who made DPaint was a games studio first)

Re: Image file formats that didn’t make it

#114

Earlier quoted context omitted.

BMP is quite complex and poorly documented (it's a bunch of random Microsoft structs and #defines), more so than PNG. BMP has compression too (RLE and Huffman). PNG is simpler here since you can just drop a DEFLATE library straight in. Images are usually stored in memory as RGBA in scanline order. You can dump this representation straight to a PNG file (edit: this is wrong, you can't). BMPs are typically written with…

If you're going to drop a library in, sure use PNG or whatever else, but the premise of this subthread was about ease of dumping an in-memory representation of the pixels into a valid file, and BMP makes that way easier than PNG does. In a couple lines of code with no external library you can create a valid BMP file with just enough header bits to tell the BMP reader how your pixels are arranged and let it deal with…

Well, you're right. I had thought you could write an uncompressed PNG, but I was wrong, it has to be DEFLATED. You can write a series of uncompressed DEFLATE blocks like you said (not so bad), but the Adler32 and CRC32 checksums kill you.

Re: Image file formats that didn’t make it

#115
post #34

JPEG2000 is a big one that seems to be missing. It is used in medical imaging or something, because laws? But its visual quality is worse than old JPEG, despite a PSNR advantage. Apparently, compression researchers used to think that people care about PSNR.

I've always been curious about the distinction between JPEG and JPEG2000. From what I can find online, everyone says that the visual quality is better than JPEG, it just flopped due to slow adoption. Could you elaborate on your claim that it's worse?

Thanks to the power of internet we do not need to speculate; here is a comparison between image formats, JPEG2000 being represented by "OPENJPEG": https://wyohknott.github.io/image-formats-comparison/#sking*...

Subjectively I think JPEG2000 is better across the different images, at least at this "medium" size preset.

Re: Image file formats that didn’t make it

#116

JPEG2000 is a big one that seems to be missing. It is used in medical imaging or something, because laws? But its visual quality is worse than old JPEG, despite a PSNR advantage. Apparently, compression researchers used to think that people care about PSNR.

I worked on a library that had to process PDFs and grabbed a bunch of PDFs from archive.org and other open sources for testing, and as I recall, about 2% of them had at least one JPEG2000 image. So if you're in the PDF space it's probably still worth considering.

Re: Image file formats that didn’t make it

#117
NAPLPS didn't really have much of any syntax. Pretty much anything was valid. I used to fix Telidon terminals back in the day. A favourite pastime was to send a terminal some wildly inappropriate data so as to enjoy the wild and trippy vector madness that would ensue.

Re: Image file formats that didn’t make it

#118

JPEG2000 is a big one that seems to be missing. It is used in medical imaging or something, because laws? But its visual quality is worse than old JPEG, despite a PSNR advantage. Apparently, compression researchers used to think that people care about PSNR.

Digital cinema uses a kind of Motion-JPEG2000. The encoding of the coefficients is so convoluted that cinema projector systems require custom hardware to do decoding in 2K at full speed. The only software algorithm that could decode it at relative speed was patented by someone involved with the format: otherwise, software decoding is very slow compared to other formats. JPEG2000 is also sometimes used to encode image…

> JPEG2000 is also sometimes used to encode images embedded in PDFs.

Interesting. I thought PDF normally convert the format into .jbig2 for embedding into the PDF itself.

Re: Image file formats that didn’t make it

#119
post #4

Anecdotally, the first time I heard of TGA was in Tomb Raider. The Tomb Raider games of old had a screenshot feature that outputted TGA files of gameplay and were useful for making walk-throughs for other people (you would typically convert them to JPG when sharing on the web). And I still see BMP files being used even in modern games. Yeah: PNG is better, but BMP has its uses.

Just to chime in, my 3D engine uses TGA to import textures too because the code is dead simple.

Sometimes when you are going to use your own format for saving data you could pick the simplest format for your import to accelerate productivity at the cost of diskspace.

In a similar way I use collada for character animations, it gets alot of slack from AAA studios (who all use FBX) but for indie development it's simple enough to be able to implement in a reasonable time (XML so you can see what's what)...

In the same line of thinking, I import static meshes from .obj, sound from .wav and last but not least font from .ttf!

The limiting factor usually is the editor you use to create/manipulate the assets in the first place, always look to the simplest export format they have, for Photoshop TGA is the simplest!

I export everything to my own custom binary formats to be loaded by the engine by customers, and there lz4 is a pretty good/simple RLE compression (RLE is also used by TGA BTW) and then .zip (also very simple!) to wrap it all up...

Keep it simple!

Re: Image file formats that didn’t make it

#120
post #96
post #88

Earlier quoted context omitted.

Not true: https://caniuse.com/?search=jxl It's in Chrome, Firefox, Edge, and Opera behind flags - works great!

It is behind a flag, with no time table when it will be officially supported. And no company ( apart from Facebook ) came up and said we will use it as long as browser supports it. Most are still in the AVIF camp.

That's awesome that Facebook is supporting it!

https://jpegxl.io/tutorials/facebook/#facebookjxlsupport

> [as of] the 8th of November 2021, all JPEG XL files were accepted ... Facebook offers full JPEG XL support

Post reply on HN