Commit 3c738b5c authored by Mathieu Malaterre's avatar Mathieu Malaterre

Import Debian changes 1.4.4-1

jpegoptim (1.4.4-1) unstable; urgency=medium

  * New upstream
  * Bump Std-Vers to 3.9.8, no changes needed
parents ae4de8ae 5cbc902b
cmake_minimum_required(VERSION 2.8)
project(jpegoptim)
#Dependency on libJPEG.
set(LIBJPEG_INCLUDE_DIR "" CACHE PATH "Path to directory containing header files of libJPEG (e.g. jpeglib.h).")
set(LIBJPEG_LIBRARY_DIR "" CACHE FILEPATH "Path to static library file of libJPEG (e.g. libjpeg.a).")
include_directories(${LIBJPEG_INCLUDE_DIR})
add_library(libjpeg STATIC IMPORTED)
set_target_properties(libjpeg PROPERTIES IMPORTED_LOCATION ${LIBJPEG_LIBRARY_DIR})
#Source files.
file(GLOB jpegoptim_SRC "*.c") #Adds all .c files in the source directory.
#Header files.
include_directories("${PROJECT_SOURCE_DIR}") #Adds all .h files in the source directory.
#Build the binary!
add_executable(jpegoptim ${jpegoptim_SRC})
target_link_libraries(jpegoptim libjpeg)
\ No newline at end of file
jpegoptim
=========
Copyright (C) 1996-2015 Timo Kokkonen <tjko@iki.fi>
Copyright (C) 1996-2016 Timo Kokkonen <tjko@iki.fi>
This program is free software; you can redistribute it
......
......@@ -3,7 +3,7 @@
#
# Makefile for jpegoptim
#
Version = 1.4.3
Version = 1.4.4
PKGNAME = jpegoptim
SHELL = /bin/sh
......
Jpegoptim v1.4.3 - Copyright (c) Timo Kokkonen, 1996-2015. All Rights Reserved.
Jpegoptim v1.4.4 - Copyright (c) Timo Kokkonen, 1996-2016. All Rights Reserved.
REQUIREMENTS
Independent JPEG Group's jpeg library (libjpeg) version 6b or later
(jpegsrc.v6b.tar.gz)
Independent JPEG Group's jpeg library (libjpeg) version 6b or later.
(Alternatively should also work with libjpeg-turbo or mozjpeg)
TESTED PLATFORMS
Linux
......@@ -18,8 +19,8 @@ INSTALLATION
tar file, make necessary changes to the Makefile, and then
compile the program. You may wanna do something like this:
zcat jpegoptim-1.4.3.tar.gz | tar xf -
cd jpegoptim-1.4.3
zcat jpegoptim-1.4.4.tar.gz | tar xf -
cd jpegoptim-1.4.4
./configure
make
make strip
......@@ -27,6 +28,9 @@ INSTALLATION
HISTORY
v1.4.4 - more detailed error messages (thanks to Denis Fateyev),
CMake support (thanks to Ghostkeeper),
other minor fixes
v1.4.3 - fix bug that could cause jpegoptim crash when processing
certain jpeg files
v1.4.2 - add option -P, --preserve-perms,
......@@ -88,5 +92,5 @@ LATEST VERSION
Timo <tjko@iki.fi>
18-May-2015 $Id$
15-Aug-2016 $Id$
......@@ -19,6 +19,9 @@
/* Define if you have mkstemps function. */
#undef HAVE_MKSTEMPS
/* Define if you have labs function. */
#undef HAVE_LABS
/* Define if you have the <getopt.h> header file. */
#undef HAVE_GETOPT_H
......
......@@ -3947,6 +3947,17 @@ _ACEOF
fi
done
for ac_func in labs
do :
ac_fn_c_check_func "$LINENO" "labs" "ac_cv_func_labs"
if test "x$ac_cv_func_labs" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LABS 1
_ACEOF
fi
done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken jmorecfg.h (METHODDEF)" >&5
......
......@@ -61,6 +61,7 @@ AC_CHECK_FUNCS(getopt_long, break, [GNUGETOPT="getopt.o getopt1.o"])
AC_SUBST(GNUGETOPT)
AC_CHECK_FUNCS(mkstemps)
AC_CHECK_FUNCS(labs)
dnl own tests
......
jpegoptim (1.4.4-1) unstable; urgency=medium
* New upstream
* Bump Std-Vers to 3.9.8, no changes needed
-- Mathieu Malaterre <malat@debian.org> Tue, 23 Aug 2016 09:06:48 +0200
jpegoptim (1.4.3-1) unstable; urgency=low
* New upstream
......
......@@ -6,7 +6,7 @@ Build-Depends: debhelper (>= 9), autotools-dev, libjpeg-dev
Homepage: http://github.com/tjko/jpegoptim
Vcs-Browser: http://anonscm.debian.org/viewvc/collab-maint/deb-maint/jpegoptim/trunk/
Vcs-Svn: svn://svn.debian.org/collab-maint/deb-maint/jpegoptim/trunk
Standards-Version: 3.9.6
Standards-Version: 3.9.8
Package: jpegoptim
Architecture: any
......
.TH JPEGOPTIM 1 "28 Nov 2014"
.TH JPEGOPTIM 1 "15 Aug 2016"
.UC 4
.SH NAME
jpegoptim \- utility to optimize/compress JPEG/JFIF files.
......@@ -170,7 +170,7 @@ jpeginfo(1)
Timo Kokkonen <tjko@iki.fi>
.SH COPYING
Copyright (C) 1996-2015 Timo Kokkonen
Copyright (C) 1996-2016 Timo Kokkonen
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
......
/*******************************************************************
* JPEGoptim
* Copyright (c) Timo Kokkonen, 1996-2015.
* Copyright (c) Timo Kokkonen, 1996-2016.
* All Rights Reserved.
*
* requires libjpeg (Independent JPEG Group's JPEG software
......@@ -34,8 +34,8 @@
#include "jpegoptim.h"
#define VERSIO "1.4.3"
#define COPYRIGHT "Copyright (c) 1996-2015, Timo Kokkonen"
#define VERSIO "1.4.4"
#define COPYRIGHT "Copyright (c) 1996-2016, Timo Kokkonen"
#define LOG_FH (logs_to_stdout ? stdout : stderr)
......@@ -685,8 +685,12 @@ int main(int argc, char **argv)
cinfo.image_height=dinfo.image_height;
jpeg_set_defaults(&cinfo);
jpeg_set_quality(&cinfo,quality,TRUE);
if ( (dinfo.progressive_mode || all_progressive) && !all_normal )
if (all_normal) {
cinfo.scan_info = NULL; // Explicitly disables progressive if libjpeg had it on by default
cinfo.num_scans = 0;
} else if ( dinfo.progressive_mode || all_progressive ) {
jpeg_simple_progression(&cinfo);
}
cinfo.optimize_coding = TRUE;
j=0;
......@@ -705,8 +709,12 @@ int main(int argc, char **argv)
/* lossless "optimization" ... */
jpeg_copy_critical_parameters(&dinfo, &cinfo);
if ( (dinfo.progressive_mode || all_progressive) && !all_normal )
if (all_normal) {
cinfo.scan_info = NULL; // Explicitly disables progressive if libjpeg had it on by default
cinfo.num_scans = 0;
} else if ( dinfo.progressive_mode || all_progressive ) {
jpeg_simple_progression(&cinfo);
}
cinfo.optimize_coding = TRUE;
/* write image */
......@@ -734,7 +742,7 @@ int main(int argc, char **argv)
if (osize == tsize || searchdone || searchcount >= 8 || tsize > isize) {
if (searchdone < 42 && lastsize > 0) {
if (abs(osize-tsize) > abs(lastsize-tsize)) {
if (labs(osize-tsize) > labs(lastsize-tsize)) {
if (verbose_mode) fprintf(LOG_FH,"(revert to %d)",oldquality);
searchdone=42;
quality=oldquality;
......@@ -793,19 +801,19 @@ int main(int argc, char **argv)
outfname=NULL;
set_filemode_binary(stdout);
if (fwrite(outbuffer,outbuffersize,1,stdout) != 1)
fatal("write failed to stdout");
fatal("%s, write failed to stdout",(stdin_mode?"stdin":argv[i]));
} else {
if (preserve_perms && !dest) {
/* make backup of the original file */
snprintf(tmpfilename,sizeof(tmpfilename),"%s.jpegoptim.bak",newname);
if (verbose_mode > 1 && !quiet_mode)
fprintf(LOG_FH,"creating backup of original image as: %s\n",tmpfilename);
fprintf(LOG_FH,"%s, creating backup as: %s\n",(stdin_mode?"stdin":argv[i]),tmpfilename);
if (file_exists(tmpfilename))
fatal("backup file already exists: %s",tmpfilename);
fatal("%s, backup file already exists: %s",(stdin_mode?"stdin":argv[i]),tmpfilename);
if (copy_file(newname,tmpfilename))
fatal("failed to create backup of original file");
fatal("%s, failed to create backup: %s",(stdin_mode?"stdin":argv[i]),tmpfilename);
if ((outfile=fopen(newname,"wb"))==NULL)
fatal("error opening output file: %s", newname);
fatal("%s, error opening output file: %s",(stdin_mode?"stdin":argv[i]),newname);
outfname=newname;
} else {
#ifdef HAVE_MKSTEMPS
......@@ -813,12 +821,12 @@ int main(int argc, char **argv)
snprintf(tmpfilename,sizeof(tmpfilename),
"%sjpegoptim-%d-%d.XXXXXX.tmp", tmpdir, (int)getuid(), (int)getpid());
if ((tmpfd = mkstemps(tmpfilename,4)) < 0)
fatal("error creating temp file: mkstemps() failed");
fatal("%s, error creating temp file %s: mkstemps() failed",(stdin_mode?"stdin":argv[i]),tmpfilename);
if ((outfile=fdopen(tmpfd,"wb"))==NULL)
#else
/* if platform is missing mkstemps(), try to create at least somewhat "safe" temp file... */
snprintf(tmpfilename,sizeof(tmpfilename),
"%sjpegoptim-%d-%d.%d.tmp", tmpdir, (int)getuid(), (int)getpid(),time(NULL));
"%sjpegoptim-%d-%d.%ld.tmp", tmpdir, (int)getuid(), (int)getpid(),(long)time(NULL));
tmpfd=0;
if ((outfile=fopen(tmpfilename,"wb"))==NULL)
#endif
......
......@@ -3,8 +3,8 @@
* JPEGoptim headers
*/
#ifndef _JPEGOPTIM_H
#define _JPEGOPTIM_H 1
#ifndef JPEGOPTIM_H
#define JPEGOPTIM_H 1
#ifdef __cplusplus
extern "C" {
......@@ -31,6 +31,10 @@ extern "C" {
#define METHODDEF(x) static x
#endif
#ifndef HAVE_LABS
#define labs abs
#endif
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
#endif
......@@ -79,4 +83,4 @@ void jpeg_memory_dest (j_compress_ptr cinfo, unsigned char **bufptr, size_t *buf
}
#endif
#endif /* _JPEGOPTIM_H */
#endif /* JPEGOPTIM_H */
Summary: Utility for optimizing/compressing JPEG files.
Name: jpegoptim
Version: 1.4.3
Version: 1.4.4
Release: 1
License: GPL
Group: Applications/Multimedia
......
......@@ -5,8 +5,8 @@
* Thanks to Javier Gutiérrez Chamorro for Windows support.
*/
#ifndef _WIN32_COMPAT_H
#define _WIN32_COMPAT_H 1
#ifndef WIN32_COMPAT_H
#define WIN32_COMPAT_H 1
#ifdef __cplusplus
extern "C" {
......@@ -47,4 +47,4 @@ extern "C" {
}
#endif
#endif /* _WIN32_COMPAT_H */
#endif /* WIN32_COMPAT_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment