News for hackers. Stuff that matters.
Re:QOI: Lossless Image Compression in O(n) Time by dylan604 on Wednesday November 24, 2021 @04:07PM (#29335168)
No, the filename is the worst place to put metadata. Nobody can control what will happen to a file name.
Re:QOI: Lossless Image Compression in O(n) Time by em3rgent0rdr on Wednesday November 24, 2021 @05:50PM (#29336113)
well nobody can control what will happen to a file's content either if you want to be pedantic.

If are worried about dumb users renaming it...I think most users know to not change things after a '.', so could just put the colorspace code there. And then could put another '.QOI' to end the filename.

If want to keep cruft out of the file itself, then putting it in the filename works.

Re:QOI: Lossless Image Compression in O(n) Time by dylan604 on Wednesday November 24, 2021 @06:12PM (#29336314)
you're talking apples and kumquats. changing the name of the file (metadata in and of itself) does not affect the file at all. changing the contents of the file will have affects on the file. some changes might not negatively affect the file (like adding metadata when none was present) if the format allows for it. you can know the file will no longer be the same by running a hash on it. name changes will not affect the hash.

also, changing the name of a file is not like, uncommon. if it is an image sequence, some people prefer an underscore before the frame number, some prefer a dot, and some even prefer a space. some places have strict file naming policies, and file names will be modified to comply.

anyone depending on crucial information to be preserved in a filename is just a Sisyphean effort of control.

Re:QOI: Lossless Image Compression in O(n) Time by em3rgent0rdr on Thursday November 25, 2021 @05:47PM (#29345723)
the color scheme is not "crucial information". It is just meta-data. It could be contained in the file, or in the filename, or outside the file in a separate metadata file.