Bug 475679 - jpegtran in el5 or Fedora 10 has no -crop option
Summary: jpegtran in el5 or Fedora 10 has no -crop option
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libjpeg
Version: 5.4
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Tom Lane
QA Contact: BaseOS QE
Depends On:
TreeView+ depends on / blocked
Reported: 2008-12-10 00:15 UTC by Clint Goudie
Modified: 2013-07-03 03:20 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 483659 (view as bug list)
Last Closed: 2009-01-30 03:09:45 UTC
Target Upstream Version:

Attachments (Terms of Use)
patch to libjpeg SPEC file to use the croppatch (1.12 KB, patch)
2009-01-30 02:02 UTC, Oded Arbel
no flags Details | Diff
croppatch from http://sylvana.net/jpegcrop/jpegtran/ (70.42 KB, patch)
2009-01-30 02:07 UTC, Oded Arbel
no flags Details | Diff

Description Clint Goudie 2008-12-10 00:15:22 UTC
Description of problem:

When trying to install Gallery2 on a el5 or fc10 box it says that the jpegtran command does not have the -crop option available, which is true. When I looked for support on this problem it was indicated that Debian, FreeBSD and a few others with the same version of jpegtran: "Independent JPEG Group's JPEGTRAN, version 6b  27-Mar-1998" have this option available.

It appears that a patch was issued for jpegtran which can be found here:


It would be nice if this patch could be applied to the el & fedora libjpeg rpms to enable this support.


Comment 1 Oded Arbel 2009-01-30 01:27:15 UTC
Same problem here - I need jpegtran to support "-crop" for Gallery2 to work properly, but the Fedora/Redhat version of libjpeg does not have the croppatch.

It would be great if someone could patch the fedora version.

Comment 2 Oded Arbel 2009-01-30 02:02:57 UTC
Created attachment 330425 [details]
patch to libjpeg SPEC file to use the croppatch

Not a person to leave things as they are (and I also rather donate then ask for donations), here is the patch I made for the libjpeg spec from fedora 10 (looks to be the same as the current Rawhide) to include the croppatch (also to be attached shortly).

In addition to the simple adding of the patch, I've also bumped the release number and added a changelog entry, I hope TGL doesn't mind.

Comment 3 Oded Arbel 2009-01-30 02:07:00 UTC
Created attachment 330426 [details]
croppatch from http://sylvana.net/jpegcrop/jpegtran/

Here is the croppatch itself - this is not the package from http://sylvana.net/jpegcrop/jpegtran/ directly, which contains copies of the original source files - instead I created a patch from all the source changes.

I've tested it on my machines and this looks to be working well - it crops, and gallery2 loves it :-)

The patch file I submitted previously assumes this file will be bziped, but I attached here uncompressed so it will be easier to examine the code changes.

Thanks in advance to anyone who may wish to integrate the changes into any current or future versions of Fedora.

Comment 4 Oded Arbel 2009-01-30 02:10:45 UTC
In addition, for anyone who is interested, there are pre-built binaries of libjpeg with the croppatch for Fedora 8 on http://rpms.geek.co.il/fc8/ , in addition to the source RPM which will probably build just fine on most other OSs.

Comment 5 Tom Lane 2009-01-30 02:29:10 UTC
I have zero interest in carrying a large patch that's not upstream.  If you want to do something useful in this area, join the sourceforge libjpeg project and help them get a release out.

Comment 6 Oded Arbel 2009-01-30 03:00:15 UTC
Thank you for the comment, and I'll see what I can do in that regard.

In the mean time I hope that the supplied patch and availability of packages will help people who want a solution right now in Fedora. 

Also if you are not interested in having a resolution to this bug in the context of Fedora, then I suggest that you close this ticket (possibly as WONTFIX or something) as there is no reason to string people along. No hard feelings (hey - my personal itch is actually already scratched ;-) ) and good luck.

Comment 7 Tom Lane 2009-01-30 03:09:45 UTC
Well, it's *certainly* unlikely to happen in the context of rhel5, which this bug is filed against; so WONTFIX it is.

Comment 8 Clint Goudie 2009-02-02 20:20:53 UTC
I specifically need this in EL5, but I understand the reasons that it wont be propagated there at this time. I'll try to get a bug submitted to the upstream provider referencing this information here.

If I can get a change from the the libjpeg upstream by filing a bug with them, I'll reopen this issue.

I'll clone this bug in Fedora 10 so it can continue there. I probably should have filed this bug in both places to begin with but my primary concerns were here.

Thanks for your help!

Note You need to log in before you can comment on or make changes to this bug.