Where is the ability to change file formats?
I want to use png not jpeg. I really dont think thats a big ask
We plan to add support for other formats but PNG is very bad at handling photos and there are better lossless image formats for this purpose such as the lossless variant of WebP.
We plan to add support for other formats but PNG is very bad at handling photos and there are better lossless image formats for this purpose such as the lossless variant of WebP.
Can you elaborate on why png is so bad?
Or go into a breakdown on the pros and cons of the formats worth talking about? Im interested to hear your thoughts about them
@NastyFlytrap long story, short: using PNG would result in huge file sizes.
but yes, i'm all for the possibility to choose the file format! @thestinger not sure if WebP is (still) really necessary... AVIF is probably the better and more future proof solution. (pretty much the same as it is the case with VP8/9 and AV1 as codecs mentioned in #31.) and IMHO for sure optionally JPEG should be kept for backwards compatibility.
@NastyFlytrap long story, short: using PNG would result in huge file sizes.
but yes, i'm all for the possibility to choose the file format! @thestinger not sure if WebP is (still) really necessary... AVIF is probably the better and more future proof solution. (pretty much the same as it is the case with VP8/9 and AV1 as codecs mentioned in #31.) and IMHO for sure optionally JPEG should be kept for backwards compatibility.
Can you define huge file sizes? You mean like 2-4 megabytes? Sure, much bigger than JPG, but like, it actually looks good...
no, i can't... not at all in absolute numbers, as it first and foremost depends on the number of pixels. (BTW: 2-4 MB is already pretty common for a JPEG picture with a "common" resolution and a "common" compression.) even specifying a ratio is nearly impossible, as it depends on so many different factors starting with the compression ratio of the JPEG... but double the size or more of a "common" JPEG would be no exception.
in a nutshell: PNG uses a lossless compression hence images with sharp transitions and large areas of solid color - which are mostly artificial generated graphics (like screenshots, buttons etc.) - are the perfect use case for it and result in better looking images with mostly even smaller file size than JPEG. but as in normal photos hardly any pixel has exactly the same color as one other, the compression of PNG can't do much and so if quality is the main priority, RAW/DNG is used anyway (#14). ...or the mentioned WebP resp. AVIF as they are both capable of a better lossy and lossless compression. @NastyFlytrap: for more on this topic read at lest the JPEG section of the PNG article in Wikipedia.
if your JPEG pictures look bad in general, either your (optical) camera is lousy... or if you can see artifacts even without zooming, try to lower the "compression" resp. increase the "quality" (some cameras also misleadingly refer to it only as "file size").
Not sure if it's relevant, but QOI is also an incredible lossless format with very fast encoding and decoding, while being very simple. https://qoiformat.org/
thanks @NXTler for the interesting read! i didn't know that at all.
but to be honest, i don't have high hopes for QOI to get adopted widely resp. by the big players that matter for mass adoption, because (beside of being kind of restrictive - which can be good and bad)...
QOI's compression is roughly comparable to PNG [...], while throughput is a lot higher.
so it produces ~40-100% bigger files than WebP/AVIF (for lossless compressed images) by lower complexity and load on the hardware. unfortunately lowering hardware requirements and saving resources is hardly a priority in todays IT industry. beside that, most of the cameras also implement video capture and as AV1 seems to have won the codec competition, manufacturers have already big parts done of implementing AVIF by implementing AV1.
so yes, it is nice to have as an alternative to PNG when low hardware requirements are critical, but i'm pretty sure it won't even supersede PNG at many places. ...for that it came ~20 years too late.
Ah, I wasn't aware that AV1 (and therefore parts of AVIF) is already the dominant format for cameras. Yeah, the compression is a real bummer here. I just wanted to share this interesting format to bring something new to the mix.
Ah, I wasn't aware that AV1 (and therefore parts of AVIF) is already the dominant format for cameras.
well... i can't tell for sure if it is the case for cameras, but in general it is (going to be - depending on the sector) the dominant codec, as e.g. all major streaming platforms use it and in 2023 even Apple "conceded".
Yeah, the compression is a real bummer here. I just wanted to share this interesting format to bring something new to the mix.
as mentioned in https://github.com/GrapheneOS/Camera/issues/14#issuecomment-1054452391 as soon a CameraX provides RAW data, theoretically all other formats can be supported. ...with that being said, implementing QOI might be even easier than PNG. 🤷 - but i guess the question is rather, if someone takes the effort to implement even one of them.
Ah, I wasn't aware that AV1 (and therefore parts of AVIF) is already the dominant format for cameras. Yeah, the compression is a real bummer here. I just wanted to share this interesting format to bring something new to the mix.
I mean, it IS interesting, but as he said, if the upside is that it uses little resources, for only being marginally smaller than png, then its not going to see any adoption. Besides, modern phones dont need to save on the photo compression hardware, they are plenty strong as is for something like that. Maybe for like an arduino or something...