Image file formats that didn’t make it
61–70 of 210 posts
Re: Image file formats that didn’t make it
#62Earlier quoted context omitted.
I think bitmaps are often used in 2d games for level definition or various other sorts of mapping (height, for 2.5d games, et c.)
Bitmap is the easiest image file format in the world to read/write and the easiest and sometimes fastest to shoot over to any video device in the history of computing. Almost every game making tutorial going back to the 80s has "how to read/write" bitmaps usually in it somewhere. Even 3D games will sometimes use them in a lot of odd places because it was faster/easier/took fewer cycles to include an uncompressed or s…
When making a quick hack like a toy ray tracer or Mandelbrot generator in C or C++, it's traditional to use .ppm [0] because it's trivial to write out pixel values in ASCII.
Re: Image file formats that didn’t make it
#63Earlier quoted context omitted.
That was my reaction. To be fair author says: "Of the formats listed here, TIFF is probably the one most likely to still be in wide use, but it has evolved into a more specialized format for professionals, in comparison to something like JPG."
TGA files still show up in video game textures surprisingly often
Surprisingly, with PNG, the deflate compression can slow you down, depending on what you are doing with the data. Saving a little bit of IO when you're accessing local data can turn out to be a losing proposition. TGA makes it easier to just shove pixels around, from program to program. TGA has all sorts of weird options which you can ignore, but with PNG, compression is mandatory.
Re: Image file formats that didn’t make it
#64Earlier quoted context omitted.
Bitmap is the easiest image file format in the world to read/write and the easiest and sometimes fastest to shoot over to any video device in the history of computing. Almost every game making tutorial going back to the 80s has "how to read/write" bitmaps usually in it somewhere. Even 3D games will sometimes use them in a lot of odd places because it was faster/easier/took fewer cycles to include an uncompressed or s…
That's why some games have uncompressed audio files which made the game size ballooned up. If the game have so much audio on, it would be best to use uncompressed audio as CPU don't have to spend extra resources to decode bunch of audio files at the same time when the games is asking for it.
(Some of that I think is also political/contractual in the way that using MP3 would give some additional types of PC players "free soundtracks" while using other compression formats is a bit of security through obscurity and raises the bar slightly for PC players that don't, for instance, know what Ogg Vorbis even is.)
Re: Image file formats that didn’t make it
#65Tiff is very much not dead. It is likely one of the image formats more widely used today. Terabytes of new tiff images are prodced every hour and distributed by many remote sensing operators. It is a really flexible and robust format also. How else are you going to store a floating-point multispectral image of 8 bands and 50.000 x 50.000 pixels, arranged tile-wise for easy cropping?
The OpenEXR format, from the film industry, can also store an image with that configuration.
Re: Image file formats that didn’t make it
#66Anecdotally, 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.
BMP and TGA have the advantage that they're uncompressed, so it's mostly trivial to dump the contents of your framebuffer to a file without any major dependencies.
BMP is more complicated, unfortunately. The header structure is more complex. And then there’s a requirement for rows to be 4-bytes aligned, might need to insert padding bytes between the rows.
Re: Image file formats that didn’t make it
#67JPEG2000 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?
This is the result of actual experiments with human subjects judging image quality.
I haven't really heard claims that JPEG2000 is better, actually. I remember people saying that it was "supposed" to be better, but not by people who dug into it and made comparisons with human eyeballs.
There were some images that would appear visibly better with JPEG2000, like photographs with those beautiful fields of defocused color. JPEG2000 captured those fields of color with all the smoothness they originally had.
Re: Image file formats that didn’t make it
#68Earlier quoted context omitted.
You can write an uncompressed PNG IIRC.
Sort of but not really. You can write out PNG files with deflate blocks that aren't compressed, so in that sense they are uncompressed PNG files, but all of the complexity of supporting compression is still there in the data format in a way that is not fully avoidable even if you don't actually compress the data. BMPs on the other hand are simple to write, only a very small portion of the header data is required and…
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 pixels in packed BGR order, rows going bottom to top. But not always. I think they go top to bottom if you give a negative height, and you can supply masks defining which bits the RGBA come from.
Re: Image file formats that didn’t make it
#69Earlier quoted context omitted.
That's why some games have uncompressed audio files which made the game size ballooned up. If the game have so much audio on, it would be best to use uncompressed audio as CPU don't have to spend extra resources to decode bunch of audio files at the same time when the games is asking for it.
This is a small pet peeve of mine. Even though PCs have mostly lost dedicated "sound cards" they still have dedicated hardware for sound decompression in their SoC packages. The big reason I think games often think they need so much uncompressed audio has not as much to do with hardware support as much as it is that games and general consumers "forked" on different compression paths in audio. Most consumer audio is M…
Do they?
Even if they do, it's typically useless for an application like a game, because the game will need to filter and/or mix that audio in ways that the hardware probably can't handle on its own. (Sure, maybe your hardware can decode one MP3 at a time, but can it decode two dozen MP3s at once, apply a bunch of environmental filters to them, and mix them down to a single stereo output? Probably not.)