After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 647495 - JPEG Quality 75 produces artifacts
JPEG Quality 75 produces artifacts
Status: RESOLVED INCOMPLETE
Product: cheese
Classification: Applications
Component: general
2.32.x
Other Linux
: Normal minor
: 2.32
Assigned To: Cheese Maintainer(s)
Cheese Maintainer(s)
Depends on: 663274
Blocks:
 
 
Reported: 2011-04-11 20:04 UTC by Pascal de Bruijn
Modified: 2012-07-16 19:28 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pascal de Bruijn 2011-04-11 20:04:15 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.
Comment 1 daniel g. siegel 2011-04-11 22:15:08 UTC
that is definitely true. want to propose a patch?
Comment 2 Pascal de Bruijn 2011-04-13 14:39:50 UTC
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.
Comment 3 Pascal de Bruijn 2011-04-13 14:43:30 UTC
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.
Comment 4 Luciana Fujii 2011-04-13 15:30:33 UTC
(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.
Comment 5 Adrian Zgorzałek 2011-11-02 21:15:08 UTC
Now it looks like camerabin2 uses as default image-capture-encoder jpegenc with default settings and its default quality is... 85.
Comment 6 Adrian Zgorzałek 2011-11-03 21:49:22 UTC
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?
Comment 7 Thiago Sousa Santos 2012-02-15 18:16:40 UTC
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?
Comment 8 Tobias Mueller 2012-07-16 18:43:21 UTC
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!
Comment 9 Pascal de Bruijn 2012-07-16 18:59:11 UTC
Sorry for the late response, quality 85 should be much better. Thanks.
Comment 10 David King 2012-07-16 19:28:35 UTC
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.