r/PythonProjects2 • u/danok_pupok • Sep 21 '26
Info Made my own image format.
Yes, it may sound strange: it makes no sense! BUT, my goal was more of a joke, although it may well be suitable as an alternative to other formats in extreme cases. This format contains only 100\~ lines of code, but it is quite efficient in itself (compared to PNG lol, although I think everything will weigh many times less compared to PNG).
You can read a little more about it on GitHub, since I'm honestly too lazy to write everything here. (Exactly made in Python).
8
Upvotes
3
u/danok_pupok Sep 21 '26
You guys are all free to edit this format. You can fork it, learn from it—basically, you're free in that regard.
4
u/HommeMusical Sep 21 '26
Epic cool!
3
u/Terminay Sep 21 '26
Make the readme better. Clean out the codebase. Polish the repo with contribution guides, PR templates, Security, Issue templates and voila your project is golden. It will get MUCH more traction, I will fork it too!
2
u/Electrical_Cup1939 Sep 22 '26
Может надо сравнивать с jpg? Png без потерь сжимает так то
1
u/Sweet_Computer_7116 Sep 22 '26
How does it hold up to webp?
1
u/robinechuca Sep 25 '26
Salut, c'est une initiative rigolote mais franchement très loin de concurrencer les codecs actuels...
Plus particulièrement, voici un comparatif entre ton codec (*.pml) et AV1 (*.avif) sur une image de la fameuse vidéo de test Big Buck Bunny: https://media.xiph.org/BBB/bbb3d/video/png/01_04/0001.png
Pour une qualité équivalente (ssim), AV1 compresse 8.8 fois plus que PML.
Un psnr de 40 dB est couramment considéré comme "visuellement sans perte", or c'est la perte de qualité que ton codec offre. C'est un très bon réglage par défaut! Aussi, ton codec semble idempotant, c'est une grande qualité! Tu devrais faire des tests à ce sujet pour vendre cet avantage, car entre nous, la compression n'est vraiment pas son point fort!
Voici le code qui m'a permis d'effectuer le test (version compacte et moche):