debian/0000755000000000000000000000000011736464121007173 5ustar debian/docs0000644000000000000000000000003211736463606010050 0ustar NEWS README README-jpeg6a debian/clean0000644000000000000000000000014311736463606010205 0ustar Makefile config.cache config.h config.log config.status stamp-h1 depcomp jpegjudge.1 judge judge.o debian/source/0000755000000000000000000000000011736463606010502 5ustar debian/source/format0000644000000000000000000000001411736463606011710 0ustar 3.0 (quilt) debian/changelog0000644000000000000000000000147011736463606011056 0ustar jpegjudge (0.0.2-2) unstable; urgency=low [ Jari Aalto ] * debian/control - (Build-Depends): Rm dpkg-dev; not needed with debhelper 9. Add autoconf. - (Standards-Version): Update to 3.9.3.1. * debian/copyright - Update to format 1.0. * debian/docs - Remove judge.txt; duplicate of manual page. * debian/rules - Update to dh(1). - Use hardened build flags http://wiki.debian.org/ReleaseGoals/SecurityHardeningBuildFlags * debian/debian-vars.mk - Delete; no longer used. [ tony mancill ] * debian/control - (Build-Depends): Add automake -- Jari Aalto Fri, 23 Mar 2012 09:03:22 -0400 jpegjudge (0.0.2-1) unstable; urgency=low * Initial release (Closes: #572608). -- Jari Aalto Fri, 05 Mar 2010 12:25:27 +0200 debian/copyright0000644000000000000000000001411611736463606011140 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0 Upstream-Name: jpegjudge Upstream-Contact: Marc Lehmann , Source: http://oldhome.schmorp.de/marc/judge.html Files: * Copyright: 2002 Marc Lehmann License: JPEG Files: judge.c Copyright: 2002 Marc Lehmann 1994-1996 Thomas G. Lane X-License-Comment: /* * judge.c * * judges the quality of jpeg files, output format similar to file(1) * * This uses code from the IJG JPEG library. The original copyright was: * * Copyright (C) 1994-1996, Thomas G. Lane. * This file is part of the Independent JPEG Group's software. * For conditions of distribution and use, see the accompanying README-jpeg6a * file. * * The estimate function and all the changes are copyright Marc Lehmann. * You can do anything with it *except* claim that you have written it. * */ License: JPEG License: JPEG [From file ./README-jpeg6a] . The Independent JPEG Group's JPEG software ========================================== . README for release 6a of 7-Feb-96 ================================= . This distribution contains the sixth public release of the Independent JPEG Group's free JPEG software. You are welcome to redistribute this software and to use it for any purpose, subject to the conditions under LEGAL ISSUES, below. . Serious users of this software (particularly those incorporating it into larger programs) should contact IJG at jpeg-info@uunet.uu.net to be added to our electronic mailing list. Mailing list members are notified of updates and have a chance to participate in technical discussions, etc. . This software is the work of Tom Lane, Philip Gladstone, Luis Ortiz, Jim Boucher, Lee Crocker, Julian Minguillon, George Phillips, Davide Rossi, Ge' Weijers, and other members of the Independent JPEG Group. . IJG is not affiliated with the official ISO JPEG standards committee. . [[...clip...]] . LEGAL ISSUES ============ . In plain English: . 1. We don't promise that this software works. (But if you find any bugs, please let us know!) 2. You can use this software for whatever you want. You don't have to pay us. 3. You may not pretend that you wrote this software. If you use it in a program, you must acknowledge somewhere in your documentation that you've used the IJG code. . In legalese: . The authors make NO WARRANTY or representation, either express or implied, with respect to this software, its quality, accuracy, merchantability, or fitness for a particular purpose. This software is provided "AS IS", and you, its user, assume the entire risk as to its quality and accuracy. . This software is copyright (C) 1991-1996, Thomas G. Lane. All Rights Reserved except as specified below. . Permission is hereby granted to use, copy, modify, and distribute this software (or portions thereof) for any purpose, without fee, subject to these conditions: (1) If any part of the source code for this software is distributed, then this README file must be included, with this copyright and no-warranty notice unaltered; and any additions, deletions, or changes to the original files must be clearly indicated in accompanying documentation. (2) If only executable code is distributed, then the accompanying documentation must state that "this software is based in part on the work of the Independent JPEG Group". (3) Permission for use of this software is granted only if the user accepts full responsibility for any undesirable consequences; the authors accept NO LIABILITY for damages of any kind. . These conditions apply to any software derived from or based on the IJG code, not just to the unmodified library. If you use our work, you ought to acknowledge us. . Permission is NOT granted for the use of any IJG author's name or company name in advertising or publicity relating to this software or products derived from it. This software may be referred to only as "the Independent JPEG Group's software". . We specifically permit and encourage the use of this software as the basis of commercial products, provided that all warranty or liability claims are assumed by the product vendor. . ansi2knr.c is included in this distribution by permission of L. Peter Deutsch, sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA. ansi2knr.c is NOT covered by the above copyright and conditions, but instead by the usual distribution terms of the Free Software Foundation; principally, that you must include source code if you redistribute it. (See the file ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part of any program generated from the IJG code, this does not limit you more than the foregoing paragraphs do. . The configuration script "configure" was produced with GNU Autoconf. It is copyright by the Free Software Foundation but is freely distributable. . It appears that the arithmetic coding option of the JPEG spec is covered by patents owned by IBM, AT&T, and Mitsubishi. Hence arithmetic coding cannot legally be used without obtaining one or more licenses. For this reason, support for arithmetic coding has been removed from the free JPEG software. (Since arithmetic coding provides only a marginal gain over the unpatented Huffman mode, it is unlikely that very many implementations will support it.) So far as we are aware, there are no patent restrictions on the remaining code. . WARNING: Unisys has begun to enforce their patent on LZW compression against GIF encoders and decoders. You will need a license from Unisys to use the included rdgif.c or wrgif.c files in a commercial or shareware application. At this time, Unisys is not enforcing their patent against freeware, so distribution of this package remains legal. However, we intend to remove GIF support from the IJG package as soon as a suitable replacement format becomes reasonably popular. . We are required to state that "The Graphics Interchange Format(c) is the Copyright property of CompuServe Incorporated. GIF(sm) is a Service Mark property of CompuServe Incorporated." . [[...clip...]] debian/compat0000644000000000000000000000000211736463606010400 0ustar 9 debian/control0000644000000000000000000000223611736463606010610 0ustar Source: jpegjudge Section: graphics Priority: optional Maintainer: Jari Aalto Build-Depends: debhelper (>= 9), autotools-dev, autoconf, automake, libjpeg8-dev Standards-Version: 3.9.3.1 Vcs-Browser: http://git.debian.org/?p=collab-maint/jpegjudge.git Vcs-Git: git://git.debian.org/git/collab-maint/jpegjudge.git Homepage: http://oldhome.schmorp.de/marc/judge.html Package: jpegjudge Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: determine which of two given jpegs (same size) is the original Try to determine which same picture was saved at a higher quality, even if the picture was saved at low quality and later at a higher quality. . By a statistical analysis over the quantization table stored in a jpeg one could probably deduce the quality which the picture was saved (i.e. this particular save), but it in no way says anything about the picture quality itself (i.e. whether it has ever been saved at lower quality before since its creation). For example, one might have saved a jpeg picture at low quality, and later saved at a higher quality, yet the information lost during the first save can't be restored. debian/repack.sh0000644000000000000000000001174111736463606011007 0ustar #!/bin/sh # # Copyright # # Copyright (C) 2008-2010 Jari Aalto # # License # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . set -e set -u Initialize () { # Check depends [ -x /bin/mktemp ] || Die "[ERROR]: mktemp (coreutils) not installed." [ -x /bin/bzip2 ] || Die "[ERROR]: bzip2 (bzip2) not installed." [ -x /bin/gzip ] || Die "[ERROR]: gzip (gzip) not installed." [ -x /bin/tar ] || Die "[ERROR]: tar (tar) not installed." } Help () { echo " SYNOPSIS repack.sh [--upstream-source] [package] DESCRIPTION Repackage upstream source. The command line arguments are due to uscan(1) order. The PACKAGE argument is optional. OPTIONS --upstream-source Option is ignored. It is passed from uscan(1) when debian/watch file is read. EXAMPLES To repack foo-1.1.tar.gz into bar-1.10.tar.gz: repack.sh 1.10 foo-1.1.tar.gz bar AUTHOR Jari Aalto . Licenced under GPL version 2 or, at your option, any later version. " exit 0 } Run () { if [ "${test+test_mode}" = "test_mode" ]; then echo "$@" else [ "${verbose+verbose_mode}" = "verbose_mode" ] && echo "$@" >&2 "$@" fi } Warn () { echo "$*" >&2 } Die () { Warn "$*" exit 1 } AtExit () { if [ "$DIR" ]; then [ -d "$DIR" ] && rm -rf "$DIR" fi } DebianVersion () { # No version conversions yet echo $1 } DebianTar () { local ver=$1 local dver=$2 local file=$3 local pkg=$4 # Convert tgz suffix file=$(echo $file | sed 's,tgz$,tar.gz,') # If version is same, use original file if [ "$ver" = "$dver" ]; then if [ "$pkg" ]; then echo $file | sed "s,.*$ver,${pkg}_$ver.orig," else echo $file fi return 0 fi if [ "$pkg" ]; then echo $file | sed -e "s,.*$ver,${pkg}_$dver.orig," else # replace with new version echo $file | sed -e "s,$ver,$dver.orig," fi } Pkg () { local file=$1 if [ -f debian/changelog ]; then dpkg-parsechangelog | awk '/^Source:/ {print $2}' else # package-1.1.tar.gz => package echo $file | sed "s,-[0-9].*,," fi } Version () { local file=$1 local pkg=$(Pkg $file) if [ ! "$pkg" ]; then Die "[ERROR] Internal error. 'pkg' variable not set. Run with debug (-x)" fi echo $file | sed -e "s,\.tar.*,," \ -e "s,\.tgz,," \ -e "s,\.tbz,," \ -e "s,\.tbz2,," \ -e "s,$pkg[-_],," } Main () { if [ $# -eq 0 ]; then Help fi Initialize case "$1" in --help|-h) Help ;; --*) shift # Ignore uscan(1) argument --upstream-version in $1 ;; esac VER="$1" FILENAME="$2" DIR= if [ ! -f "$FILENAME" ]; then Die "[ERROR] Arg 2. File does not exist: $FILENAME" fi FILE_DIR=$(dirname $FILENAME) FILE=$(basename $FILENAME) PKG=${3:-$(Pkg $FILE)} if [ ! "$PKG" ]; then Die "[ERROR] Internal error. PKG not set. Run with debug (-x)" fi CURVER=$(Version $FILE) if [ ! "$CURVER" ]; then Die "[ERROR] Internal error. CURVER not set. Run with debug (-x)" fi DVER=$(DebianVersion "$VER") DFILE=$(DebianTar "$CURVER" "$DVER" "$FILE" $PKG) # Debian Developer's Reference 6.7.8.2 Repackaged upstream source REPACK_DIR="$PKG-$DVER.orig" DIR=$(mktemp -d ./tmp.repack.XXXXXX) echo "Repacking $FILENAME as $PKG-$DVER" # Create an extra directory to cope with tarballs that # do not have root/ directory UP_BASE="$DIR/unpack" Run mkdir "$UP_BASE" Run tar -C "$UP_BASE" -xf "$FILENAME" if [ $(ls -1 "$UP_BASE" | wc -l) -eq 1 ]; then # Tarball does contain a root directory UP_BASE="$UP_BASE/$(ls -1 "$UP_BASE")" fi # # Repack Run mv "$UP_BASE" "$DIR/$REPACK_DIR" # Don't use pipes. Errors are not handled correctly if pipes aree used. Run tar -C "$DIR" -cf "$DIR/repacked.tar" "$REPACK_DIR" # The .orig file must uxe gzip compression tar="$DIR/repacked.tar" case "$DFILE" in *.bz2) DFILE=$(echo $DFILE | sed "s/.bz2/.gz/") ;; *.gz) ;; *) Die "Unknown *.suffix in $DFILE" ;; esac suffix=".gz" Run gzip --best "$tar" if [ -f "$DFILE" ]; then echo "Warning, overwriting $DFILE" fi Run mv "$tar$suffix" "$DFILE" echo "Done $DFILE" } trap AtExit QUIT INT EXIT Main "$@" # End of file debian/README.source0000644000000000000000000000062711736463606011366 0ustar jpegjudge for Debian -------------------- The original binary was repacked with debian/repack.sh: debian/repack.sh judge- jpegjudge The original binary name "judge" was renamed to "jpegjudge" to avoid clash with the multi user dungeon engine . -- Jari Aalto , Fri, 5 Mar 2010 10:03:58 +0200 debian/rules0000755000000000000000000000203711736463606010264 0ustar #!/usr/bin/make -f PACKAGE = jpegjudge ORIGBIN = judge BINDIR = $(CURDIR)/debian/$(PACKAGE)/usr/bin export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed CFLAGS += $(CPPFLAGS) # Original files modified by the build process KEEP_FILES = \ Makefile.in \ aclocal.m4 \ config.h.in \ configure \ install-sh \ missing \ mkinstalldirs \ stamp-h.in override_dh_auto_clean: # Skip. See debian/rules. This would cause ./config.status --recheck override_dh_auto_configure: # Save original files for f in $(KEEP_FILES); do [ -f $$f.orig ] || cp -va $$f $$f.orig ; done autoreconf -fi dh_auto_configure override_dh_auto_build: dh_auto_build # Restore files for f in $(KEEP_FILES); do [ ! -f $$f.orig ] || mv -v $$f.orig $$f; done override_dh_auto_install: install -m 755 -D $(ORIGBIN) $(BINDIR)/$(PACKAGE) override_dh_installman: # Rename page cp $(ORIGBIN).1 $(PACKAGE).1 dh_installman $(PACKAGE).1 rm -f $(PACKAGE).1 %: dh $@ # End of file debian/watch0000644000000000000000000000011011736463606010223 0ustar version=3 http://oldhome.schmorp.de/marc/judge.html .*judge-(.+).tar.gz debian/patches/0000755000000000000000000000000011736463606010631 5ustar debian/patches/10-judge.c--change-name.patch0000644000000000000000000000105211736463606015623 0ustar From 218b95db8451ea682ec5c37ffc4a7623d9bb9f9f Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Mon, 4 Jan 2010 21:47:35 +0200 Subject: [PATCH] judge.c: change reported name Signed-off-by: Jari Aalto --- judge.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/judge.c b/judge.c index b002e4d..7724f82 100644 --- a/judge.c +++ b/judge.c @@ -16,6 +16,8 @@ */ #include "config.h" +#undef PACKAGE +#define PACKAGE "jpegjudge" #include #include -- 1.6.5 debian/patches/00-judge.1--long-opt.patch0000644000000000000000000000176411736463606015146 0ustar From e8c98c34fc846929abb3ef44be70854ad87c21a1 Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Mon, 4 Jan 2010 21:33:03 +0200 Subject: [PATCH] judge.1: document GNU --long options Signed-off-by: Jari Aalto --- judge.1 | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/judge.1 b/judge.1 index 4082236..8a12412 100644 --- a/judge.1 +++ b/judge.1 @@ -5,7 +5,7 @@ .SH SYNOPSIS .B judge [ -.B \-v +.B \-V ] .P .B judge @@ -25,11 +25,14 @@ It can read all pictures the can read, i.e. normal and progressive jpeg's. .SS OPTIONS .TP -.B -v -Display version number and exit. -.TP .B -b Display only quality indicator, suppress other information (filenames). +.TP +.B \-h, \-\-help +Display short summary of options. +.TP +.B \-V, \-\-version +Display version number and exit. .SH BUGS It should be possible to judge pictures stored in non-lossy formats, too, since conversion to jpeg may influence the measurement. -- 1.6.5 debian/patches/10-judge.c--change-name=11-long-opt.patch0000644000000000000000000000326711736463606017631 0ustar From 1d81fa815fc29de41dc41daec0bc3a67970641f3 Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Tue, 5 Jan 2010 15:55:36 +0200 Subject: [PATCH] judge.c: Add GNU --long options Signed-off-by: Jari Aalto --- judge.c | 46 +++++++++++++++++++++++++++++++++++++++------- 1 files changed, 39 insertions(+), 7 deletions(-) diff --git a/judge.c b/judge.c index 7724f82..db4b2ee 100644 --- a/judge.c +++ b/judge.c @@ -24,6 +24,7 @@ #include #include #include +#include #include @@ -111,27 +112,58 @@ judge_quality (char *filename) static void usage (char *prog, int ec) { - fprintf (stderr, "Usage: %s [ -vb ] file ...\n", prog); + fprintf (stderr, "Usage: %s [ -Vb ] file ...\n", prog); exit (ec); } +void +version (void) +{ + printf ("%s %s\n", VERSION, PACKAGE); + exit (0); +} + +const char * +is_in_list (int size, char **const list, const char *string) +{ + int i = 0; + + while (i < size) + { + if ( !strcmp( list[i], string) ) + return list[i]; + + i++; + } + + return (const char *)NULL; +} + int main (int argc, char **argv) { int display_filenames = 1; int retcode = 0; - + + /* Handle long options */ + + if ( is_in_list (argc, argv, "--help")) + usage (argv[0], 0); + + if ( is_in_list (argc, argv, "--version")) + version(); + for (;;) { - switch (getopt (argc, argv, "hvb")) + switch (getopt (argc, argv, "hVb")) { case 'h': usage (argv[0], 0); - case 'v': - printf ("%s version %s\n", PACKAGE, VERSION); - exit (0); - + case 'V': + version(); + break; + case 'b': display_filenames = 0; break; -- 1.7.0 debian/patches/00-judge.1--long-opt=02-name.patch0000644000000000000000000000166311736463606016321 0ustar From daf4e046d1236dddbc878d6a5b711c86df7e50fa Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Mon, 4 Jan 2010 21:37:14 +0200 Subject: [PATCH] Change name to jpegjudge Signed-off-by: Jari Aalto --- judge.1 | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/judge.1 b/judge.1 index 8a12412..374628f 100644 --- a/judge.1 +++ b/judge.1 @@ -1,20 +1,20 @@ -.TH JUDGE 1 "Judge - guess picture quality" +.TH JPEGJUDGE 1 "Jpegjudge - guess jpeg picture quality" .SH NAME -.I judge +.I jpegjudge \- guess jpeg picture quality .SH SYNOPSIS -.B judge +.B jpegjudge [ .B \-V ] .P -.B judge +.B jpegjudge [ .B \-b ] file ... .SH DESCRIPTION -.I Judge +.I Jpegjudge reads each argument and attempts to guess the quality with which it was saved. Currently, only a rough indicator is calculcated, ranging from 0 (lowest quality) to 1000 (highest quality), an -- 1.6.5 debian/patches/series0000644000000000000000000000020611736463606012044 0ustar 00-judge.1--long-opt.patch 00-judge.1--long-opt=02-name.patch 10-judge.c--change-name.patch 10-judge.c--change-name=11-long-opt.patch