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 318376 - JPEG saving ignores original quality
JPEG saving ignores original quality
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: Editing
0.1.x
Other Linux
: Normal normal
: ---
Assigned To: F-spot maintainers
F-spot maintainers
: 350301 (view as bug list)
Depends on: 346452
Blocks:
 
 
Reported: 2005-10-09 22:37 UTC by Stanislav Brabec
Modified: 2006-12-07 21:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
jpegdump for f-spot (50.91 KB, patch)
2006-06-02 13:51 UTC, Stephane Delcroix
none Details | Review

Description Stanislav Brabec 2005-10-09 22:37:33 UTC
Distribution/Version: SuSE Linux 10.0

1. Have a 5MB JPEG Super Fine Quality JPEG from camera.
2. Apply Red eyes

Now compare sizes of original and changed file. It has about half size and there
is not chance to save "nearly original quality".

For example of program, which is able to guess JPEG quality, you can use
jpegdump (from Tom Lane).
Comment 1 Larry Ewing 2006-02-17 21:31:57 UTC
this is a good point I'll take a look at jpegdump
Comment 2 Stanislav Brabec 2006-02-17 21:47:58 UTC
There is an alternative way of improving of small areas of jpeg image implemented in the jpegpixi program. It recompresses only areas where change was done and does verbatim copy of compressed data of the rest of the image. Maybe it can be applied for red eyes, too.

http://www.zero-based.org/software/jpegpixi/
Comment 3 Larry Ewing 2006-02-17 21:51:34 UTC
ah, that is very cool, I'll definitely look into it as well
Comment 4 Bengt Thuree 2006-05-18 03:54:21 UTC
Any news on this one?
Comment 5 Stephane Delcroix 2006-06-01 15:32:23 UTC
Just downloaded and had a look at the jpegdump code. Before working with this, I'm wondering if the licence is compatible with the GPL.

Here's the copyright notice:
<snip>
Copyright (c) 1992 Handmade Software, Inc.
by Allan N. Hessenflow

Permission to use, copy, modify, and distribute this software and
its documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and
that both that copyright notice and this permission notice appear in
supporting documentation.  This software is provided "as is" without
express or implied warranty.
<snap>

The 'without fee' thing could not be compatible with the GPL...
Comment 6 Bengt Thuree 2006-06-01 17:38:47 UTC
Perhaps check with the author? Perhaps he can change to GPL?
Comment 7 Bengt Thuree 2006-06-01 17:40:40 UTC
jpegpixi as suggested in comment #2 is released under GPL though :)
Comment 8 Stephane Delcroix 2006-06-01 17:56:14 UTC
jpegpixi could (probalby) be used for red-eye removing. But for color correction, sepia tones, lossy cropping, ... it should be great to guess the compression factor.

I try to contact the author of jpegdump, asking if he could release it under gpl or lgpl...

wait and see...
Comment 9 Stephane Delcroix 2006-06-02 13:51:07 UTC
Created attachment 66658 [details] [review]
jpegdump for f-spot

Here is a small patch (1000+ lines) adding the ability to guess the compression factor used for a jpeg.

You can use it like this: 
JpegUtils.GuessQuality(filename)

It includes a lot of code from jpegdump, which is *NOT* in GPL (waiting for feedback from the author).

I'm not planning to write code here and there in f-spot for supporting this before having news from the original author of jpegdump.

Nevertheless, you can already review it. (just add a call to that code somewhere in f-spot).

Some technical informations:
- new libjpegdump directory with the modified tool
- binding in libfspot
- binding to libfspot in JpegUtils.cs
Comment 10 Stephane Delcroix 2006-06-03 07:45:02 UTC
Just received (so did Larry) a mail from the author of jpegdump:

<snip>
Yes, I am hereby granting permission to release jpegdump under the GPL.

allan

-- 
Allan N. Hessenflow      
<snap>
Comment 11 Larry Ewing 2006-06-14 16:06:13 UTC
Ugh, I meant to have this in by now, I have a version of the extracted guessing code in my tree.  I'll try to get it finished today.
Comment 12 Larry Ewing 2006-06-14 17:02:13 UTC
ok I've committed the ported guess quality code to JpegHeader but haven't hooked it up to any of the saving functions.
Comment 13 Stephane Delcroix 2006-06-15 07:38:28 UTC
Larry, very good job !
I've also started to port the code to C#, but you were quicker !
Comment 14 Gonzalo Paniagua Javier 2006-08-08 11:20:17 UTC
*** Bug 350301 has been marked as a duplicate of this bug. ***
Comment 15 Larry Ewing 2006-11-01 21:45:57 UTC
now that the guessing code I'll dig up my old patch to use the guess when saving a new version.
Comment 16 Stephane Delcroix 2006-12-07 21:55:10 UTC
Fixed in CVS by Larry yesterday... closing it.