GNOME Bugzilla – Bug 647495
JPEG Quality 75 produces artifacts
Last modified: 2012-07-16 19:28:35 UTC
Currently Cheese saves JPEGs with quality 75 and both horizontal and vertical subsampling. Pushing the JPEG Quality from 75 to 85 reduces the amount of artifacts visibly on some images, without increasing the filesizes too dramatically. Ideally it would be nice to be able to configure the JPEG Quality via GConf/GSettings, since I can understand you might not want to clutter the Preferences dialog with such obscure settings.
that is definitely true. want to propose a patch?
Well, I wouldn't mind taking a look... Though some quick grepping didn't really turn up where the JPEG is saved at all? What little experience I have with libjpeg is C, so I guess Vala/GDK has this abstracted away? So I'm probably grepping for the wrong things. Maybe you can give me some pointers? which source files are interesting? which functions to look for? BTW, just to be clear I won't look into the GConf/GSettings stuff, if I can I'll submit a patch just to change to default quality to at least Q85.
Though that does bring to bear to idea that saving to PNG would be even nicer, since that would introduce no loss at all... Maybe I should clear up my use-case for cheese a bit, I'm actually using Cheese with a digital usb microscope (which in essence is a uvc-webcam): http://blog.pcode.nl/2011/04/13/most-modern-lcd-panels-are-bgr-instead-of-rgb/ Some of Cheese's video filter are particular handy, like the horiz/vert flipping.
(In reply to comment #2) > Maybe you can give me some pointers? which source files are interesting? which > functions to look for? > Cheese now uses Camerabin internally and for taking pictures, we use camerabin defaults. You should check libcheese/cheese-camera.c to change that. We already change the encoder for video recording, (search for theoraenc) so this should be very similar.
Now it looks like camerabin2 uses as default image-capture-encoder jpegenc with default settings and its default quality is... 85.
As Pascal de Bruijn suggested the quality could be adjusted by the user by GSettings now (later by preference dialog?). I don't know current Cheese priorities, but adding this to current master won't be difficult, also adding it to camerabin2 branch won't be difficult either, but is it going to be introduced or there is no work needed in this area?
jpegenc default is 85, yes. Both camerabin and camerabin2 should be using the default values. Checking through cheese's code and I don't see any mention of "quality" under "" as it would be needed to change the jpegenc's property. So the defaults are being used AFAICT. Pascal, is it still worth adding PNG for your use case?
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!
Sorry for the late response, quality 85 should be much better. Thanks.
The jpegenc default is already 85, and Cheese does not modify that. All JPEG images created by Cheese in my photos folder (only goes back to early 2012) have a quality of 85.