Skip to main content

Posts

Showing posts from November, 2021

Deciphering yet another mystery parameter - camera picture quality

I don't know much about photography and much less about image formats. The little I know comes mostly from web development. There I use images as semi-static assets, and I know how to work around the potential problems.  That experience was of limited use when I worked on end-user-created images on a React Native app I'm working on. I needed a crash course into JPEGs.  We use react-native-camera to take photos. Snapping one has an elusive option called photo quality . It is an integer in a range between zero and one, and in the example code, it was set to 0.5. Zero point five . What does that mean? Is that good? 0.5 does not feel that good. To me, a modern iPhone is more than 0.5? The default value is 1 though, is that better? I wanted to find out what turning that mystery knob entails. Spoiler alert: the JPEG quality is clearly explained in the JPEG Wikipedia article, but obviously, I needed to jump through some hoops to understand that. I want to go through some generic th...