News for hackers. Stuff that matters.
Re:QOI: Lossless Image Compression in O(n) Time by amelius on Wednesday November 24, 2021 @08:23AM (#29329723)
Yes, also store the DPI.

In general, allow arbitrary key-value pairs to be stored.

Re:QOI: Lossless Image Compression in O(n) Time by mkl on Wednesday November 24, 2021 @09:37AM (#29330336)
> Yes, also store the DPI.

I don't think that's a good idea. Most images, like photos and screenshots, don't have physical dimensions. Some image tools like to put in bogus default DPI values that are guaranteed to be wrong, and it can be a bit of pain.

Re:QOI: Lossless Image Compression in O(n) Time by amelius on Wednesday November 24, 2021 @10:29AM (#29330916)
How else would you reproduce images at exactly the right size? Without DPI, the format would be useless for many scientific purposes.

But I get your worries. As a compromise, DPI could be optional.

Re:QOI: Lossless Image Compression in O(n) Time by account42 on Thursday November 25, 2021 @02:34AM (#29339055)
Reproducing images at the "right" size is a very niche requirement. Most images don't even have a right size, including all photographs unless they either use an ortographic projection (they won't) or the object is completely flat and parallel to the focus plane (with recilinear projection, which most normal camera lenses come close to). Having this as a standard attribute in a generic image format makes no sense.
Re:QOI: Lossless Image Compression in O(n) Time by pulp_user on Friday November 26, 2021 @11:22AM (#29351525)
You are complaining about a format - with the stated goal to be very simple - not supporting some scientific usecase. What...? Use a different format then. That's not what this is trying to be. In fact, it's the exact opposite of what it's trying to be.
Re:QOI: Lossless Image Compression in O(n) Time by mkl on Wednesday November 24, 2021 @02:19PM (#29333981)
Yes, optional is fine.
Re:QOI: Lossless Image Compression in O(n) Time by makapuf on Wednesday November 24, 2021 @09:02AM (#29330017)
If you want any interop you'd better standardize some keys, allowing for extensions. Store those in key,len,data records and you have iff/ riff formats ... used by .avi and .wav formats.
Re:QOI: Lossless Image Compression in O(n) Time by grishka on Thursday November 25, 2021 @07:31AM (#29340782)
This is something I've never understood. DPI only makes sense if you need to accurately represent some physical dimensions in an image. Most of the time, you do not. You would just map it onto screen pixels somehow, most probably dictated by the UI layout around it.

Color profiles however, yes, those are indeed important.