News for hackers. Stuff that matters.
Re:QOI: Lossless Image Compression in O(n) Time by cyber_kinetist on Wednesday November 24, 2021 @07:29AM (#29329317)
I think the author's intending to use this only as a data packing format (ex. for app/game development) and not a general-purpose exchange format. If all you want to do is pack image/texture data for your game then I totally get why they assume RGBA8 storage and leave out metadata such as color space information.
Re:QOI: Lossless Image Compression in O(n) Time by jameshart on Wednesday November 24, 2021 @12:40PM (#29332691)
Right - this thread of people asking for colorspaces, dpi data, arbitrary metadata collections… all are exhibiting precisely the ‘expert group’ committee mindset that this format is supposed to avoid.

If you want all that, there are formats galore that support it! The point is more: where are the formats for people who don’t need all that? Here is one. Please don’t try to ruin it.

Re:QOI: Lossless Image Compression in O(n) Time by alkonaut on Wednesday November 24, 2021 @04:10PM (#29335203)
You don’t need to support a ton of complex stuff, but if an rgb image format doesn’t then it should just have a version marker and the spec can simply say “the rgb data represents sRGB colors”.

Just like e.g. some compilers don’t support a lot of source file encodings but their non-support consists of clearly stating that a source file is UTF-8.

Note that this requirement is only for an image exchange format. A raw-er image format used internally in e.g a game doesn’t need it as badly.

But in an exchange format every user needs to know whether the image data is sRGB or Adobe. Because the reader didn’t encode the data.

Re:QOI: Lossless Image Compression in O(n) Time by BlueTemplar on Thursday November 25, 2021 @03:37AM (#29339423)
Of course a closer equivalent here would be a source file only supporting (zero-padded) ASCII... so quite limiting in terms of real world needs !
Re:QOI: Lossless Image Compression in O(n) Time by sitkack on Thursday November 25, 2021 @09:17AM (#29341529)
Because this thing looks like it could fill the same need as ProRes while being simpler and open source. For the applications are you are talking about, the format cannot be ruined because it is an internal implementation detail, in the same way that the stb_* libraries can never be ruined. They are yours and everyone's for forever.

The GPs advice about recording color space is spot on. Why design a new container when there are tons of ones off the shelf ones. The collection of files inside a Zip is my goto.

Re:QOI: Lossless Image Compression in O(n) Time by pornel on Wednesday November 24, 2021 @08:39AM (#29329850)
I know games tend to assume color spaces from context, and do other hacky things like reusing alpha for height maps or RGB for vector coordinates.

But this approach is a source of endless conflict with image processing tooling, because nobody except the game author knows what the channels mean. Game developers keep complaining about image processing tools doing anything other than bytes-in-bytes-out on that data (e.g. clearing "unused" alpha or treating RGB as human-perceptible colors), because it breaks the unstated assumptions.

Re:QOI: Lossless Image Compression in O(n) Time by dv_dt on Wednesday November 24, 2021 @02:55PM (#29334356)
Yup embed enough metadata so you can actually nicely automate/integrate doing the right thing with tooling.
Re:QOI: Lossless Image Compression in O(n) Time by zcw100 on Wednesday November 24, 2021 @11:20AM (#29331576)
I wonder if color profiles will be important to images used for AI. Right now, as far as I can tell, people generally ignore details like that but I wonder if someday people are going to say, "oh wait, we've been completely ignoring color profiles. We could have been using that" or "we didn't realize how ignoring that messed things up"
Re:QOI: Lossless Image Compression in O(n) Time by kortex on Wednesday November 24, 2021 @02:19PM (#29333988)
I'm in the computer vision space and have looked into the effect of color spaces and encodings.

People had basically exactly the epiphany you described. For example, there are several color models which try to be more lighting-invariant or (racially) color blind (this is a very similar problem, humans are all more or less "orange" hue-wise due to melanin's spectrum). TSL is one such space, there are others.

https://en.m.wikipedia.org/wiki/TSL_color_space

Re:QOI: Lossless Image Compression in O(n) Time by dr_zoidberg on Thursday November 25, 2021 @11:06AM (#29342437)
Quick question, from the context and how the wikipedia article was written I assumed TSL was fairly new, however looking at the dates of the published papers it all seems be late 90's early 2000's. Is this still in use somehow? I've never heard of it before, even though I've dabbled a bit in image processing from time to time in my line of work.
Re:QOI: Lossless Image Compression in O(n) Time by Const-me on Wednesday November 24, 2021 @05:44PM (#29336067)
Videogames don't need color spaces, but they have different compression formats on GPUs, like S3TC, BC7, or ASTC. These things save not just storage, also VRAM bandwidth.
Re:QOI: Lossless Image Compression in O(n) Time by account42 on Thursday November 25, 2021 @03:00AM (#29339223)
Videogames do need color spaces once you want to do any advanced enough lighting, it's jus that the only ones you want are sRGB or linear (floating point) so it can often be assumed by context.

S3TC, BC7, and ASTC are all lossy compressions so they are really not comparable.

Re:QOI: Lossless Image Compression in O(n) Time by BlueTemplar on Thursday November 25, 2021 @03:42AM (#29339451)
Why wouldn't they need color spaces ??

A lot of people don't want to play games that look bad - I'd assume that this is going to be a particular issue when a game goes for photo-realistic graphics, only to end with people with orange skin colour on lots of monitors...

Re:QOI: Lossless Image Compression in O(n) Time by pulp_user on Friday November 26, 2021 @11:15AM (#29351462)
What are you even talking about? Using sRGB won't make skin magically orange.
Re:QOI: Lossless Image Compression in O(n) Time by pixel_fcker on Saturday November 27, 2021 @01:31PM (#29362249)
It will if the output is expecting RGB in Rec.2020 or P3 and you give it sRGB data…