debian/0000775000000000000000000000000012301064502007161 5ustar debian/copyright0000664000000000000000000002163512253646253011142 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: ExactImage Upstream-Contact: René Rebe Source: http://dl.exactcode.de/oss/exact-image/ Files: * Copyright: 2000-2013, René Rebe 2000-2010, Valentin Ziegler 2007-2008, Lars Kuhtz 2007-2008, Susanne Klaus 2006-2009, ExactCODE GmbH 2006-2008, Archivista GmbH License: GPL-2 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; version 2 of the License. . 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. . On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2 file. Files: codecs/agg* Copyright: 2002-2005, Maxim Shemanarev Comment: http://www.antigrain.com/license/ License: BSD-3-clause or other The Anti-Grain Geometry library is dual-licensed under the BSD license and its own license. . In Debian, the Anti-Grain Geometry library is distributed under BSD. . Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Files: codecs/agg_svg_parser.* codecs/agg_svg_path_renderer.cc codecs/agg_svg_path_tokenizer.cc Copyright: 2002-2005, Maxim Shemanarev 2008, René Rebe License: BSD-3-clause or other The Anti-Grain Geometry library is dual-licensed under the BSD license and its own license. . In Debian, the Anti-Grain Geometry library is distributed under BSD. . Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Files: codecs/dcraw.h Copyright: 1997-2008, Dave Coffin License: GPL-2+ or other The Dave Coffin's raw photo decoder is dual-licensed under the GNU General Public License (GPL), and its own license. . In Debian, the Dave Coffin's raw photo decoder is distributed under GPL-2+. . No license is required to download and use dcraw.c. However, to lawfully redistribute dcraw, you must either (a) offer, at no extra charge, full source code* for all executable files containing RESTRICTED functions, (b) distribute this code under the GPL Version 2 or later, (c) remove all RESTRICTED functions, re-implement them, or copy them from an earlier, unrestricted Revision of dcraw.c, or (d) purchase a license from the author. . On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2 file. Files: codecs/jinclude.h codecs/jpegint.h codecs/transupp.* Copyright: 1991-1994, Thomas G. Lane License: other This file is part of the Independent JPEG Group's free JPEG software, in Debian packaged as libjpeg6b. . LEGAL ===== . 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-1998, 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. Files: debian/* Copyright: 2008-2009, Daniel Baumann 2010, Jakub Wilk 2012-2013, Sven Eckelmann License: GPL-2+ 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. . On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2 file. debian/rules0000775000000000000000000000503112253646253010257 0ustar #!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie export DEB_CFLAGS_MAINT_APPEND=-fopenmp -ffunction-sections -fdata-sections export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed -Wl,--gc-sections MAKEOPTIONS = X_SYSTEM=Linux Q= DBG_PACKAGE=$(shell dpkg-parsechangelog|grep '^Source: '|sed 's/^Source:\s*//')-dbg MAKE := $(MAKE) X_SYSTEM=Linux Q= PHPAPI = $(shell php-config5 --phpapi) binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep: dh $@ --parallel --list-missing --with=python2 get-orig-source: $(CURDIR)/debian/get-orig-source.sh override_dh_auto_configure: ./configure --prefix=/usr --includedir=/usr/include --mandir=/usr/share/man --infodir=/usr/share/info --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --with-ruby=no override_dh_auto_clean: touch config.make dh_auto_clean -- $(MAKEOPTIONS) override_dh_auto_test: override_dh_auto_build: mkdir -p objdir/api/python/ touch objdir/api/python/_ExactImage.so # prevent from being built this time dh_auto_build -- all $(MAKEOPTIONS) set -e; \ for python in $(shell pyversions -r); do \ rm -f objdir/api/python/_ExactImage.so; \ dh_auto_build -- $(MAKEOPTIONS) objdir/api/python/_ExactImage.so PYTHONINCS=`$$python-config --includes`; \ mkdir -p objdir/api/$$python; \ cp objdir/api/python/*.so objdir/api/$$python/; \ cp objdir/api/python/*.py objdir/api/$$python/; \ chmod a-x objdir/api/$$python/*; \ done $(MAKE) -C debian/manpages/ override_dh_auto_install: dh_auto_install -- $(MAKEOPTIONS) WITHPYTHON=0 mkdir debian/tmp/usr/lib/php5 mv debian/tmp/usr/lib/php debian/tmp/usr/lib/php5/$(PHPAPI) echo "php:Depends=phpapi-$(PHPAPI)" >> debian/php5-exactimage.substvars set -e; \ for python in $(shell pyversions -r); do \ PYDIR=$$($${python} -c 'from distutils.sysconfig import get_python_lib; print get_python_lib()'); \ mkdir -p debian/tmp/$${PYDIR}; \ cp -a objdir/api/$$python/* debian/tmp/$${PYDIR}; \ done cd debian/tmp/usr/lib/perl5 && mv site_perl/* . && rmdir site_perl override_dh_strip: dh_strip -a --dbg-package="$(DBG_PACKAGE)" override_dh_shlibdeps: dh_shlibdeps sed -i -e '/shlibs:Depends.*\(libevas[^ ]*\).*/ { p; s//evas:Depends=\1-engines-x/; b }; /^evas:Depends=/d' debian/*.substvars .PHONY: binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep \ get-orig-source override_dh_auto_configure override_dh_auto_build override_dh_auto_install override_dh_strip override_dh_shlibdeps override_dh_auto_clean override_dh_auto_test debian/manpages/0000775000000000000000000000000012253646253010773 5ustar debian/manpages/edisplay.1.xml0000664000000000000000000001146012253646253013470 0ustar ExactImage Manual edisplay Jakub Wilk Wrote this manual page for the Debian system.
jwilk@debian.org
This manual page incorporates texts found on the ExactImage homepage.
This manual page was written for the Debian system (and may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2.
edisplay 1 edisplay fast image viewer edisplay file edisplay Description ExactImage is a fast C++ image processing library. Unlike many other library frameworks it allows operation in several color spaces and bit depths natively, resulting in low memory and computational requirements. edisplay loads the specified images, one by one, and displays them on a X-server (or other display device if the minimal abstracted needed is added). In the top-left corner a tiny, shaded on-screend-display shows the current cursor position as well as the color value of the pixel. For images including an alpha channel a checkboard is displayed in the background. Options Utilize OpenGL for rendering. Display help text and exit. Key and mouse bindings Space, Backspace Go through the list of specified images. arrow keys, PageUp/PageDown, left mouse button, mouse-wheel: Pan the image. +, -, Ctrl+mouse-wheel Zoom the image. 1 Reset zoom to 1:1. Tab, Shift+Tab Cycle through the image channels as color dropout and intensity maps. a Toggle anti-aliasing. <, > Rotate the image. q Quit the application. See also exactimage7
debian/manpages/edentify.1.xml0000664000000000000000000001652212253646253013471 0ustar ExactImage Manual edentify Jakub Wilk Wrote this manual page for the Debian system.
jwilk@debian.org
This manual page incorporates texts found on the ExactImage homepage.
This manual page was written for the Debian system (and may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2.
edentify 1 edentify image indentifiction tool of the ExactImage toolkit edentify format-string file edentify Description ExactImage is a fast C++ image processing library. Unlike many other library frameworks it allows operation in several color spaces and bit depths natively, resulting in low memory and computational requirements. edentify is is a command line frontend for the image processing library and mimicks ImageMagick's identify. It is used to identify images, that is print the codec, pixel dimensions, resolution and physical sizes (if any resolution is specified in the image data) as well as the color space. Options Set a user-defined format string. You can use the following format characters: %d directory %f filename %t filename without extension %e filename extension %i path (directory + filename) %w width %h height %q quantum depth %x x resolution %y y resolution %z image depth %P page width and height %% literal percent character t new line character n new line character r carriage return character Make the output more verbose. Display help text and exit. Examples $ edentify lenea.tiff lenea.tiff: TIFF 512x512 24 bits, 3 channels See also exactimage7
debian/manpages/exactimage.7.xml0000664000000000000000000000766612253646253014010 0ustar ExactImage Manual exactimage Jakub Wilk Wrote this manual page for the Debian system.
jwilk@debian.org
This manual page incorporates texts found on the ExactImage homepage.
This manual page was written for the Debian system (and may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2.
exactimage 7 exactimage image processing library Description ExactImage is a fast C++ image processing library. Unlike many other library frameworks it allows operation in several color spaces and bit depths natively, resulting in low memory and computational requirements. File formats ExactImage supports the following file formats: BMP Digital camera RAW GIF JPEG JPEG2000 OpenEXR PNG PBM RAW TIFF XPM SVG (read-only, partial support) PDF (write-only, allows embedding JPEG and JPEG2000, vector geometry and fonts, and writing multiple pages) PostScript (write-only, allows embedding JPEG) Encapsulated PostScript (write-only, allows embedding JPEG) PCX Targa, TGA See also bardecode1, e2mtiff1, econvert1, edentify1, empty-page1, hocr2pdf1, optimize2bw1
debian/manpages/econvert.1.xml0000664000000000000000000004673712253646253013522 0ustar ExactImage Manual econvert Jakub Wilk Wrote this manual page for the Debian system.
jwilk@debian.org
This manual page incorporates texts found on the ExactImage homepage.
This manual page was written for the Debian system (and may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2.
econvert 1 econvert image converter of the ExactImage toolkit econvert option input-file output-file econvert Description ExactImage is a fast C++ image processing library. Unlike many other library frameworks it allows operation in several color spaces and bit depths natively, resulting in low memory and computational requirements. econvert is a command line frontend for the image processing library and mimicks ImageMagick's convert. However econvert syntax is not compatible with convert. Options Input/output Read image from the specified file. Optionally, filenames can be prefixed with format name, e.g. jpg:- or raw:rgb8-dump. Save output image to the specified file. Optionally, filenames can be prefixed with format name, e.g. jpg:- or raw:rgb8-dump. Append output image to the specified file. Existing image must have the same width as the appended one. Optionally, filenames can be prefixed with format name, e.g. jpg:- or raw:rgb8-dump. Use the specified compression method for writing images, e.g. G3, G4, Zip, … The default depends on the output format. Use the specified decompression method for reading images. Use the specified quality used for writing compressed images. Valid values are integers from 0 to 100. The default is 75. Set metadata resolution. Set image dimensions for raw images. Split the image in Y-direction into multiple images. Scaling, cropping, transformations Scale image data with bi-cubic filter. Use scale factor x. Scale image data with bi-linear filter. Use scale factor x. (Down)scale image data with box filter. Use scale factor x. Scale image data with data dependent triangulation. Use scale factor x. Scale image data to nearest neighbour. Use scale factor x. Scale image data using a method suitable for specified factor x. Quick and dirty down-scale for a thumbnail. Use scale factor x. Crop the specified area out of the image. Fast auto crop. Flip the image vertically. Flip the image horizontally. Rotate the image n degrees. Colors Change the image brightness. Change the image contrast. Change the image saturation. Change the image lightness. Change the image hue. Negate the image. Change the image gamma. Transform the image to span the full color range. Convert image colorspace. Valid values are: BW, BILEVEL, GRAY, GRAY1, GRAY2, GRAY4, RGB, YUV and CYMK. Perform Floyd-Steinberg dithering using n shades. Perform Riemersma dithering using n shades. Filters Perform gaussian blur with standard deviation stdev. Shuffle every 2nd line. Detect edges. Convolve the image using the specified convolution matrix. Drawing Set foreground color. Set background color. Use the specified font for drawing text. Use the specified text rotation. Draw text. Set stroke width for vector primitives. Draw a line. Help Display help text and exit. Examples Basics Image data must be read using or , processing routines are selected by their name with two leading dashes (e.g. ) and at any point the data might be written into a file with or , for example: econvert -i lenea.tiff --box-scale 0.5 -o medium.png --box-scale 0.5 -o little.png Lossless transformations of JPEG files The library delays image decoding as much as possible and provides lossless algorithms to work on compressed data (such as JPEGs) directly: econvert -i AV220-Scan.JPG --resolution 300x300 -o 1.jpg --rotate 90 -o 2.jpg --rotate 180 -o 3.jpg --rotate -90 -o 4.jpg --flip -o 5.jpg --flop -o 6.jpg --scale 0.25 -o thumb.jpg In this example 1.jpg will be created from the original JPEG DCT coefficients, those coefficients will be rearranged and 2.jpg, 3.jpg, 4.jpg, 5.jpg and 6.jpg will be written without any additional loss in quality. Only at the end, for image thumb.jpg, the DCT will actually be decoded — but due to the accelerated JPEG scaling only partially. Thumbnails of bi-level images When 1 bit, black and white, images are scaled down, the output often looks bad, as the library algorithms always operate in the color-space the image data is stored in. To work around this problem, the colorspace must be changed (e.g. to 8 bit gray) before applying the box scaler. At the end the result might be converted back to just a few shades of gray such as 2 or 4 bit: econvert -i avision-bw-scan.pbm --colorspace gray8 --box-scale 0.125 --colorspace gray2 -o thumb.png Faster JPEG down-scaling If you don't care about quality, only about throughput, you can force nearest neighbor scaling by just specifying a scale factor the JPEG decoder can accelerate (½, ¼, or ⅛) and apply the remaining scaling manually. To achieve faster scaling with the effective factor ⅓: econvert -i big.jpg --scale .5 --nearest-scale 0.66 -o thumb.jpg Working with digital camera RAW data Wide range of digital camera RAW formats is supported. Usually decoding of RAW data should be transparent and automatic, however some formats also are also valid TIFF files and the embedded thumbnail might be picked by in favour of the actual RAW content. This this cases the dcraw decoder can explicitly be requested with the decoder prefix of the input parameter: econvert -i dcraw:img_0123.cr2 … To quickly extract the embedded thumbnail preview, specify thumb as decompression method before the image is loaded: econvert --decompress thumb -i dcraw:img_0123.cr2 … Loading arbitrary raw data It is possible to load arbitrary raw data via the raw: codec specification; color-depth (colorspace) and size for the raw data have to be explicitly specified: econvert --size 1696x32 --colorspace rgb8 -i raw:data-file … See also exactimage7
debian/manpages/empty-page.1.xml0000664000000000000000000001123612253646253013727 0ustar ExactImage Manual empty-page Jakub Wilk Wrote this manual page for the Debian system.
jwilk@debian.org
This manual page incorporates texts found on the ExactImage homepage.
This manual page was written for the Debian system (and may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2.
empty-page 1 empty-page empty page detector of the ExactImage toolkit empty-page option input-file empty-page Description ExactImage is a fast C++ image processing library. Unlike many other library frameworks it allows operation in several color spaces and bit depths natively, resulting in low memory and computational requirements. empty-page counts dark pixels of a black and white image and decides with a threshold whether the page is most probably empty, and thus can be removed from the image processing stream. Options Read image from the specified file. Set width of border margin to skip. For speed reasons, the margin has to be a multiple of 8. The default is 16. Set fraction of permissible dark pixels. The default is 0.05 (5%). Display help text and exit. Examples $ empty-page -i test.tif The image has 75461 dark pixels from a total of 1060992 (7.11231%). non-empty Exit status The exit status is 0 if the image is mostly white, 1 otherwise. See also exactimage7
debian/manpages/optimize2bw.1.xml0000664000000000000000000001501712253646253014133 0ustar ExactImage Manual optimize2bw Jakub Wilk Wrote this manual page for the Debian system.
jwilk@debian.org
This manual page incorporates texts found on the ExactImage homepage.
This manual page was written for the Debian system (and may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2.
optimize2bw 1 optimize2bw automatic thresholder of the ExactImage toolkit optimize2bw option input-file output-file optimize2bw Description ExactImage is a fast C++ image processing library. Unlike many other library frameworks it allows operation in several color spaces and bit depths natively, resulting in low memory and computational requirements. optimize2bw reads image files and performs automatic thresholding and optional scaling on the data. It is useful for long term archiving of documents that have to be stored in sub-byte black and white data to reduce storage requirements. Options Read image from the specified file. Save output image to the specified file. Remove (“denoise”) single bit pixel noise. Scale the image to the specified resolution. Set high normalization value. Set low normalization value. Set “unsharp mask” radius. The default is 0. Set output scale factor. The default is 1.0. Set standard deviation for Gaussian distribution. The default is 0.0. Set threshold value. The default is 0. Display help text and exit. Examples $ optimize2bw -i logo.jpg -o logo.tif Scale: 0 See also exactimage7
debian/manpages/e2mtiff.1.xml0000664000000000000000000000706312253646253013216 0ustar ExactImage Manual e2mtiff Jakub Wilk Wrote this manual page for the Debian system.
jwilk@debian.org
This manual page incorporates texts found on the ExactImage homepage.
This manual page was written for the Debian system (and may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2.
e2mtiff 1 e2mtiff any to multi-page TIFF converter of the ExactImage toolkit bardecode output-file file bardecode Description ExactImage is a fast C++ image processing library. Unlike many other library frameworks it allows operation in several color spaces and bit depths natively, resulting in low memory and computational requirements. e2mtiff converts a set of images into a multi-page TIFF file. Options Save output image to the specified file. Display help text and exit. See also exactimage7
debian/manpages/Makefile0000664000000000000000000000054212253646253012434 0ustar XML_FILES = $(wildcard *.xml) MAN_FILES = $(XML_FILES:.xml=) XSL = http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl XSL_PARAMS = --param man.charmap.use.subset 0 .PHONY: all all: $(MAN_FILES) %: %.xml xmllint --valid --noout $(<) xsltproc $(XSL_PARAMS) $(XSL) $(<) .PHONY: clean clean: rm $(MAN_FILES) # vim:ts=4 sw=4 noet debian/manpages/bardecode.1.xml0000664000000000000000000001313512253646253013567 0ustar ExactImage Manual bardecode Jakub Wilk Wrote this manual page for the Debian system.
jwilk@debian.org
This manual page incorporates texts found on the ExactImage homepage.
This manual page was written for the Debian system (and may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2.
bardecode 1 bardecode barcode recognition tool of the ExactImage toolkit bardecode option file bardecode Description ExactImage is a fast C++ image processing library. Unlike many other library frameworks it allows operation in several color spaces and bit depths natively, resulting in low memory and computational requirements. bardecode is a barcode recognition tool. Options Set bi-level threshold value to n. The default is 150. Set number of lines that are scanned concurrently. The default is 4. Set number of lines that are skipped. The default is 8. Set bitfield of directions to be scanned: 0 none 1 left-to-right 2 top-down 4 right-to-left 8 down-top 15 any The default is 15 (any). Display help text and exit. Examples $ bardecode files/* files/1.tif: XDM152EU-U [type: code39 at: (1094,392)] files/2.tif: 471186080198 [type: ean13 at: (1148,32)] files/3.tif: 06396500104997 [type: code128 at: (578,83)] See also exactimage7
debian/manpages/hocr2pdf.1.xml0000664000000000000000000001237412253646253013372 0ustar ExactImage Manual hocr2pdf Jakub Wilk Wrote this manual page for the Debian system.
jwilk@debian.org
This manual page incorporates texts found on the ExactImage homepage.
This manual page was written for the Debian system (and may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2.
hocr2pdf 1 hocr2pdf hOCR to PDF converter of the ExactImage toolkit hocr2pdf option input-file output-file hocr2pdf Description ExactImage is a fast C++ image processing library. Unlike many other library frameworks it allows operation in several color spaces and bit depths natively, resulting in low memory and computational requirements. hocr2pdf creates well layouted, searchable PDF files from hOCR (annotated HTML) input obtained from an OCR system. Options Read image from the specified file. Note that input hOCR is read from the standard input. Save output PDF to the specified file. Don't place the image over the text. By default the text layer is hidden behind the image. Sloppily place text, group words, do not draw single glyphs. Override resolution of the input image to n dpi. The default resolution (if not specified in the input file) is 300 dpi. Display help text and exit. Example $ hocr2pdf -i scan.tiff -o test.pdf < cuneiform-out.hocr See also exactimage7
debian/get-orig-source.sh0000775000000000000000000000153412253646253012555 0ustar #! /bin/sh set -e if [ -z "$DIR" ]; then DIR=exactimage fi # try to download source package if [ "$1" != "snapshot" ]; then uscan --verbose --force-download else umask 000 TMP="`mktemp -t -d`" MANIFEST="`mktemp -t`" R="$(svn info "http://svn.exactcode.de/exact-image/trunk"|grep '^Revision'| sed 's/^Revision: //')" VERSION=$(dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p' | sed -e 's/[\+~]svn.*$//') REV="${VERSION}+svn${R}" svn export -r"${R}" "http://svn.exactcode.de/exact-image/trunk" "${TMP}/${DIR}-${REV}/" TARNAME="${DIR}_${REV}.orig.tar" ( cd "${TMP}" find "${DIR}-${REV}/" -type f |sed 's/^\.*\/*//'|sort > "$MANIFEST" tar cf "${TARNAME}" --owner 0 --group 0 --numeric-owner --no-recursion --files-from "$MANIFEST" ) mv "${TMP}/${TARNAME}" . gzip -n -f "${TARNAME}" rm -rf "${TMP}" "$MANIFEST" fi debian/source/0000775000000000000000000000000012253646253010500 5ustar debian/source/format0000664000000000000000000000001412253646253011706 0ustar 3.0 (quilt) debian/gbp.conf0000664000000000000000000000005712253646253010621 0ustar [DEFAULT] pristine-tar = True sign-tags = True debian/php5-exactimage.examples0000664000000000000000000000001712253646253013717 0ustar examples/*.php debian/python-exactimage.install0000664000000000000000000000003412253646253014213 0ustar /usr/lib/python*/*-packages debian/edisplay.manpages0000664000000000000000000000003312253646253012523 0ustar debian/manpages/edisplay.1 debian/watch0000664000000000000000000000017512253646253010234 0ustar version=3 http://dl.exactcode.de/oss/exact-image/exact-image(?:-|\.|_|_v|)(\d\S*)\.(?:tar\.xz|txz|tar\.bz2|tbz2|tar\.gz|tgz) debian/changelog0000664000000000000000000003313212301064502011035 0ustar exactimage (0.8.9-3build1) trusty; urgency=medium * No change rebuild for phpapi-20121212+lfs (LFS ABI break on 32-bit arches). -- Robie Basak Wed, 19 Feb 2014 08:20:18 +0000 exactimage (0.8.9-3) unstable; urgency=low * Upgraded to policy 3.9.5, no changes required * debian/patches: - Add libgif.patch, Link against libgif instead of deprecated libungif (Closes: #732327) -- Sven Eckelmann Mon, 16 Dec 2013 19:55:34 +0100 exactimage (0.8.9-2) unstable; urgency=high * Fix CVE-2013-1441: exactimage: DoS, econvert crashes * debian/gbp.conf - Force pristine-tar to guarantee correct orig tarball with git-buildpackage * debian/patches: - Add CVE-2013-1441.patch, exactimage: DoS, econvert crashes -- Sven Eckelmann Wed, 04 Sep 2013 21:05:50 +0200 exactimage (0.8.9-1) unstable; urgency=high * New Upstream Version * Fix CVE-2013-1438: multiple denial of service vulnerabilities (Closes: #721236) * debian/rules: - Enable section garbage collection to reduce size caused by partial linked static library - Provide override_dh_auto_clean/test to avoid problems with stricter debhelper clean/test behavior since 9.20130720 * debian/patches: - Add gcc_48_dcraw_infinite_loop.patch, Avoid infinite loops generated by GCC 4.8 caused by undefined behaviour - Remove upstream merged tga_memcpy_signature.patch and spelling_error.patch - Add CVE-2013-1438, Fix CVE-2013-1438 -- Sven Eckelmann Thu, 29 Aug 2013 16:17:32 +0200 exactimage (0.8.8-3) unstable; urgency=low * Disable LTO again because it triggers binutils bug PR/15323 (or similar) on armel, armhf, ia64, mips, mipsel, powerpc, ... -- Sven Eckelmann Sun, 02 Jun 2013 10:55:06 +0200 exactimage (0.8.8-2) unstable; urgency=low * debian/patches: - Add verbose_build.patch, Enforce simple verbose build for blhc - Add decode_before_read_stride.patch, Decode image before accessing the stride attribute for rotation (Closes: #523948) - Add tga_memcpy_signature.patch, Don't write outside tga signature array - Add spelling_error.patch, Fix "characters" spelling error * debian/rules: - Activate LTO for reduce binary size * debian/control - Remove Daniel Stender as maintainer (Closes: #708417) - Switch from libtiff-dev provided by oldlib libtiff4-dev to libtiff5-dev -- Sven Eckelmann Sat, 01 Jun 2013 22:59:02 +0200 exactimage (0.8.8-1) unstable; urgency=low [ Sven Eckelmann ] * New Upstream Version * debian/control: - Reformat for better usability with version control systems - Add Vcs-* fields to debian/control - Upgraded to policy 3.9.4, no changes required * Update debian/copyright to copyright-format 1.0 * Update compat level to 9 * debian/rules: - Enable security flags in debian/rules - Convert to dh - Fix installation path for python modules - Provide optional target get-orig-source * debian/patches: - Use common suffix .patch - Rebase on top of 0.8.8 - Remove upstream merged edentify_tga_mismatch.patch, gcc47.patch, missing_include_vector.patch, optimize2bw_denoise.patch * Convert from python-support to python2 * Update years in debian/copyright [ Boris Pek ] * debian/copyright: - Corrected license text for codecs/dcraw.h - Use more specific BSD-3-clause license short name instead of BSD - Replace old dep-5 style "|" with "or" [ Bart Martens ] * Rewrite debian/watch -- Sven Eckelmann Sun, 05 May 2013 13:12:03 +0200 exactimage (0.8.5-5+deb7u3) stable-security; urgency=high * Add debian/patches/CVE-2013-1441.patch, Fix CVE-2013-1441: exactimage: DoS, econvert crashes -- Sven Eckelmann Wed, 04 Sep 2013 21:27:57 +0200 exactimage (0.8.5-5+deb7u2) stable-security; urgency=high * Add debian/patches/CVE-2013-1438.patch, Fix CVE-2013-1438: multiple denial of service vulnerabilities (Closes: #721236) -- Sven Eckelmann Thu, 29 Aug 2013 17:16:53 +0200 exactimage (0.8.5-5) unstable; urgency=low * debian/control: - Add Daniel Stender and Sven Eckelmann as new maintainer (Closes: #587062) - Depend on libpng-dev instead of libpng12-dev (Closes: #662317) - Depend on libjpeg8-dev to avoid hiccups with other libjpeg versions * debian/patches: - Add edentify_tga_mismatch.patch, Fix misidentification of PNM as TGA (Closes: #575324) - missing_include_vector.patch, Add missing includes for std::vector - Add libjpeg8_compat.patch, Build jpeg functionality for libjpeg8 to avoid crashes and other hiccups (Closes: #679775) - Add optimize2bw_denoise.patch, Fix optimize2bw denoise crash on 64-bit systems (Closes: #679772) -- Sven Eckelmann Sun, 01 Jul 2012 15:55:10 +0200 exactimage (0.8.5-4) unstable; urgency=low * QA upload. * Fix build failure with GCC 4.7 (Sven Eckelmann). Closes: #667159. -- Matthias Klose Wed, 30 May 2012 04:23:46 +0000 exactimage (0.8.5-3) unstable; urgency=low * QA upload. * Patch libpng15: Fix FTBFS with libpng 1.5 (closes: #635745). Thanks to Nobuhiro Iwamatsu for the patch! -- Ralf Treinen Fri, 05 Aug 2011 12:04:05 +0200 exactimage (0.8.5-2) unstable; urgency=low * QA upload (see #587062). + Set Maintainer to Debian QA Group. * Add build-arch and build-indep targets. * Remove Vcs-* fields. -- Jakub Wilk Fri, 17 Jun 2011 00:08:28 +0200 exactimage (0.8.5-1) unstable; urgency=low * New upstream release. + Refresh patches. * Fix a formatting error in the bardecode manual page. * Bump standards version to 3.9.1: + Replace Conflicts with Breaks. * Drop debian/pyversions. * Export LDFLAGS. * Use dpkg-buildflags. Build depend on dpkg-dev (>= 1.15.7). * Drop transitional dummy package exactimage-perl. * Respect the ‘parallel’ build option. * Use OpenMP: append ‘-fopenmp’ to CFLAGS. + Build edisplay (closes: #520975): - Build depend on libevas-dev and libxrender-dev. - Automatically generate dependencies on libevas*-engines-x. - Restore references to edisplay in package description and in manual pages. - Install MIME information. * Loosen dependencies of the exactimage-dbg package. Use Breaks to ensure that versions of packages matches. * Bump standards to version to 3.9.2 (no changes needed). -- Jakub Wilk Sat, 30 Apr 2011 14:30:54 +0200 exactimage (0.8.1-3+deb6u3) oldstable-security; urgency=high * Add debian/patches/CVE-2013-1441.patch, Fix CVE-2013-1441: exactimage: DoS, econvert crashes -- Sven Eckelmann Wed, 04 Sep 2013 21:27:57 +0200 exactimage (0.8.1-3+deb6u2) oldstable-security; urgency=high * Add debian/patches/CVE-2013-1438.patch, Fix CVE-2013-1438: multiple denial of service vulnerabilities (Closes: #721236) -- Sven Eckelmann Thu, 29 Aug 2013 17:16:53 +0200 exactimage (0.8.1-3) unstable; urgency=low * Don't use upstream Makefile to install Python modules (really closes: #582431). * Disable dead code that is causing compilation errors (closes: #583281). -- Jakub Wilk Sun, 30 May 2010 11:36:08 +0200 exactimage (0.8.1-1) unstable; urgency=low * New upstream release: + Drop configure-perl-detection.diff, different fix applied upstream. + Drop utility-timer-dead-code.diff, different fix applied upstream. * Fix FTBFS with nostrip build option. * Remove bogus Python modules directory created by upstream Makefile (closes: #582431). Thanks to Stefano Rivera for the bug report. * Use DESTDIR, not prefix, for make install. * Update years in debian/copyright. -- Jakub Wilk Fri, 21 May 2010 01:28:14 +0200 exactimage (0.8.0-4) unstable; urgency=low * Patch the configure script to make detection of Perl more robust (closes: #578549). Thanks to Niko Tyni for the bug report. [configure-perl-detection.diff] -- Jakub Wilk Thu, 22 Apr 2010 20:53:59 +0200 exactimage (0.8.0-2) unstable; urgency=low * Add ‘X_SYSTEM=Linux’ to yet another make invocation to fix build failures on non-Linux systems. * Rewrite manual pages in DocBook XML from scratch. + Build-depend on docbook-xsl, docbook-xml, xsltproc, libxml2-utils. * Add proper Replaces/Conflicts to the libexactimage-perl, which were accidentally ommited in the previous release. -- Jakub Wilk Sun, 11 Apr 2010 20:09:24 +0200 exactimage (0.8.0-1) unstable; urgency=low * New upstream release: + --help no longer trigger errors (closes: #574880, #574885, #574890). + SVG with invalid path no longer leads to crashes (closes: #574124). + Drop edisplay-dpy.diff, applied upstream. + Drop utility-timer-syntax-error.diff, applied upstream. + Refresh other patches. * Improve package descriptions (both in debian/control and in manual pages). * Shorten “SEE ALSO” sections of manual pages. * Disable dead code in utility/Timer.cc, as it is causing build failures on some architectures. [utility-timer-dead-code.diff] * Explicitly disable building with evas. * Build extensions for all supported Python versions. + Build-depend on python-all-dev. + Update debian/rules accordingly. * Add ‘Q=’ to each make invocation to make build process more verbose. * Embedded copy of AGG is no longer shipped; remove references from debian/copyright. * Install Perl modules into the correct directory (closes: #575749). Thanks to Bruce Stephens for the bug report. * In order to comply with Perl Policy 4.2, rename exactimage-perl to libexactimage-perl (closes: #575935). Thanks to Ansgar Burchardt for the bug report. -- Jakub Wilk Fri, 09 Apr 2010 21:11:38 +0200 exactimage (0.7.5-3) unstable; urgency=low * Fix FTBFS with Python 2.6 as the default version (closes: #571209). -- Jakub Wilk Sun, 28 Feb 2010 15:07:57 +0100 exactimage (0.7.5-1) unstable; urgency=low * New upstream release. * New maintainer (closes: #543838). * Switch to source format 3.0 (quilt). * Various improvements in package building: + Add ‘X_SYSTEM=Linux’ to each make invocation to enable compilation on non-Linux systems. + Fix building Python modules (closes: #568671): - Add XS-Python-Version header. - Build depend on python-dev (>= 2.5.4) rather than python-all-dev (for now, only modules for the current Python version are built). - As upstream Makefile always put the modules in 2.5 directory, move them into the right one in debian/rules. - Move *.so with detached symbols to a directory where gdb will expect it. - Update debian/*.install to catch both site-packages and dist-packages. - Drop debian/pycompat. + Fix syntax and name errors. [utility-timer-syntax-error.diff, edisplay-dpy.diff] + Link with system copy of AGG (closes: #570089): - Update debian/rules. - Add missing includes. [agg-missing-includes.diff] - Use PIC version of static AGG library. [agg-pic.diff] + Don't let the configure script be called more that once. + Produce debugging information for the core library. + Respect the ‘noopt’ build option. [makefile-cflags.diff] + Use LDFLAGS=-Wl,--as-needed to avoid superfluous runtime dependencies. * Fix exactimage-dbg package description. * Remove duplicate section field for the binary package. * Add ‘Depends: ${misc:Depends}’ to binary packages. * Add watchfile. * Fix typos: in the manual pages and in frontends/econvert.cc. [econvert-typo.diff] * Bump standards version to 3.8.4 (no changes needed). * Add Vcs-* fields. * Remove all references to edisplay, as Debian package cannot ship it for now (see bug #520975). * Update debian/copyright; convert it to the DEP-5 format. -- Jakub Wilk Tue, 16 Feb 2010 18:34:31 +0100 exactimage (0.7.4-3) unstable; urgency=low * QA upload. * Remove alternatives to the phpapi-* dependency (Closes: #566296) -- Raphael Geissert Fri, 29 Jan 2010 19:26:25 -0600 exactimage (0.7.4-2) unstable; urgency=low * Updating package to standards version 3.8.3. * Removing vcs fields. * Orphaning package. -- Daniel Baumann Thu, 27 Aug 2009 07:15:20 +0200 exactimage (0.7.4-1) unstable; urgency=low * Using correct rfc-2822 date formats in changelog. * Merging upstream version 0.7.4. * Updating standards version to 3.8.2. -- Daniel Baumann Mon, 06 Jul 2009 14:36:40 +0200 exactimage (0.7.3-1) unstable; urgency=low * Merging upstream version 0.7.3. -- Daniel Baumann Sun, 03 May 2009 12:25:00 +0200 exactimage (0.7.2-1) unstable; urgency=low * Updating section of debug packages. * Merging upstream version 0.7.2. * Tidy rules file. -- Daniel Baumann Sun, 26 Apr 2009 11:08:00 +0200 exactimage (0.7.1-1) unstable; urgency=low * Merging upstream version 0.7.1. * Updating to standards version 3.8.1. * Adding alternatives to phpapi depends. * Correcting permissions of ExactImage.py. -- Daniel Baumann Sun, 22 Mar 2009 14:23:00 +0100 exactimage (0.7.0-1) unstable; urgency=low * Merging upstream version 0.7.0. -- Daniel Baumann Sun, 22 Mar 2009 13:50:00 +0100 exactimage (0.6.9-1) unstable; urgency=low * Initial release (Closes: #502183). -- Daniel Baumann Sat, 07 Feb 2009 14:45:00 +0100 debian/edisplay.mime0000664000000000000000000000114012253646253011657 0ustar image/gif; edisplay %s; test=test -n "$DISPLAY" image/jp2; edisplay %s; test=test -n "$DISPLAY" image/jpeg; edisplay %s; test=test -n "$DISPLAY" image/png; edisplay %s; test=test -n "$DISPLAY" image/svg+xml; edisplay %s; test=test -n "$DISPLAY"; priority=1 image/tiff; edisplay %s; test=test -n "$DISPLAY" image/x-ms-bmp; edisplay %s; test=test -n "$DISPLAY" image/x-portable-anymap; edisplay %s; test=test -n "$DISPLAY" image/x-portable-bitmap; edisplay %s; test=test -n "$DISPLAY" image/x-portable-graymap; edisplay %s; test=test -n "$DISPLAY" image/x-portable-pixmap; edisplay %s; test=test -n "$DISPLAY" debian/control0000664000000000000000000000753112253646253010611 0ustar Source: exactimage Section: graphics Priority: optional Maintainer: Sven Eckelmann Standards-Version: 3.9.5 Homepage: http://www.exactcode.de/site/open_source/exactimage/ Vcs-Git: git://anonscm.debian.org/collab-maint/exactimage.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/exactimage.git Build-Depends: debhelper (>= 9), docbook-xml, docbook-xsl, dpkg-dev (>= 1.16.1.1), libagg-dev, libevas-dev, libexpat-dev, libfreetype6-dev, libgif-dev, libjasper-dev, libjpeg8-dev, liblcms1-dev, libopenexr-dev, libperl-dev, libpng-dev, libtiff5-dev, libx11-dev, libxml2-utils, libxrender-dev, php5-dev, pkg-config, python-all-dev (>= 2.6.6-3~), swig, xsltproc, X-Python-Version: >= 2.5 Package: exactimage Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends}, Recommends: edisplay Description: fast image manipulation programs ExactImage is a fast C++ image processing library. Unlike many other library frameworks it allows operation in several color spaces and bit depths natively, resulting in low memory and computational requirements. . This package contains the utilities. Package: edisplay Architecture: any Depends: ${evas:Depends}, ${misc:Depends}, ${shlibs:Depends}, Description: fast image manipulation programs (image viewer) ExactImage is a fast C++ image processing library. Unlike many other library frameworks it allows operation in several color spaces and bit depths natively, resulting in low memory and computational requirements. . This package contains the image viewer. Package: exactimage-dbg Section: debug Priority: extra Architecture: any Depends: ${misc:Depends}, exactimage | edisplay | libexactimage-perl | php5-exactimage | python-exactimage Breaks: edisplay (<< ${binary:Version}), edisplay (>> ${binary:Version}), exactimage (<< ${binary:Version}), exactimage (>> ${binary:Version}), libexactimage-perl (<< ${binary:Version}), libexactimage-perl (>> ${binary:Version}), php5-exactimage (<< ${binary:Version}), php5-exactimage (>> ${binary:Version}), python-exactimage (<< ${binary:Version}), python-exactimage (>> ${binary:Version}), Description: fast image manipulation library (debug symbols) ExactImage is a fast C++ image processing library. Unlike many other library frameworks it allows operation in several color spaces and bit depths natively, resulting in low memory and computational requirements. . This package contains debug symbols. Package: libexactimage-perl Section: perl Architecture: any Depends: ${misc:Depends}, ${perl:Depends}, ${shlibs:Depends}, Breaks: exactimage-perl (<< 0.8), Replaces: exactimage-perl (<< 0.8), Description: fast image manipulation library (Perl bindings) ExactImage is a fast C++ image processing library. Unlike many other library frameworks it allows operation in several color spaces and bit depths natively, resulting in low memory and computational requirements. . This package contains the Perl bindings. Package: php5-exactimage Section: php Architecture: any Depends: ${misc:Depends}, ${php:Depends}, ${shlibs:Depends}, Description: fast image manipulation library (PHP bindings) ExactImage is a fast C++ image processing library. Unlike many other library frameworks it allows operation in several color spaces and bit depths natively, resulting in low memory and computational requirements. . This package contains the PHP bindings. Package: python-exactimage Section: python Architecture: any Depends: ${misc:Depends}, ${python:Depends}, ${shlibs:Depends}, Provides: ${python:Provides} Description: fast image manipulation library (Python bindings) ExactImage is a fast C++ image processing library. Unlike many other library frameworks it allows operation in several color spaces and bit depths natively, resulting in low memory and computational requirements. . This package contains the Python bindings. debian/php5-exactimage.install0000664000000000000000000000014512253646253013551 0ustar /usr/lib/php*/*/ExactImage.so /usr/lib/php*/*/ExactImage.php /usr/share/doc/php5-exactimage/examples debian/libexactimage-perl.install0000664000000000000000000000001712253646253014324 0ustar /usr/lib/perl* debian/exactimage.install0000664000000000000000000000017412253646253012701 0ustar usr/bin/hocr2pdf usr/bin/optimize2bw usr/bin/econvert usr/bin/e2mtiff usr/bin/empty-page usr/bin/edentify usr/bin/bardecode debian/python-exactimage.examples0000664000000000000000000000001612253646253014363 0ustar examples/*.py debian/exactimage.manpages0000664000000000000000000000033612253646253013026 0ustar debian/manpages/exactimage.7 debian/manpages/empty-page.1 debian/manpages/bardecode.1 debian/manpages/optimize2bw.1 debian/manpages/e2mtiff.1 debian/manpages/edentify.1 debian/manpages/econvert.1 debian/manpages/hocr2pdf.1debian/patches/0000775000000000000000000000000012253646253010627 5ustar debian/patches/CVE-2013-1438.patch0000664000000000000000000000573212253646253013254 0ustar Description: Fix CVE-2013-1438 Author: Sven Eckelmann --- diff --git a/codecs/dcraw.h b/codecs/dcraw.h index 476f3a2fac6264f6a07804c2680c249687168e7d..b115191c2f8f049e8ad933e0f83de52568413ec2 100644 --- a/codecs/dcraw.h +++ b/codecs/dcraw.h @@ -835,6 +835,9 @@ int CLASS ljpeg_diff (ushort *huff) { int len, diff; + if(!huff) + longjmp (failure, 2); + len = gethuff(huff); if (len == 16 && (!dng_version || dng_version >= 0x1010000)) return -32768; @@ -889,6 +892,9 @@ void CLASS lossless_jpeg_load_raw() struct jhead jh; ushort *rp; + if(jh.wide<1 || jh.high<1 || jh.clrs<1 || jh.bits <1) + longjmp (failure, 2); + if (!ljpeg_start (&jh, 0)) return; jwide = jh.wide * jh.clrs; @@ -909,6 +915,8 @@ void CLASS lossless_jpeg_load_raw() } if (raw_width == 3984 && (col -= 2) < 0) col += (row--,raw_width); + if(row>raw_height) + longjmp (failure, 3); if ((unsigned) row < raw_height) RAW(row,col) = val; if (++col >= raw_width) col = (row++,0); @@ -5463,6 +5471,7 @@ int CLASS parse_tiff_ifd (int base) data_offset = get4()+base; ifd++; break; } + if(len > 1000) len=1000; /* 1000 SubIFDs is enough */ while (len--) { i = ftell(ifp); fseek (ifp, get4()+base, SEEK_SET); @@ -5681,7 +5690,7 @@ guess_cfa_pc: break; case 50715: /* BlackLevelDeltaH */ case 50716: /* BlackLevelDeltaV */ - for (num=i=0; i < len; i++) + for (num=i=0; i < len && i < 65536; i++) num += getreal(type); black += num/len + 0.5; break; @@ -5806,9 +5815,12 @@ void CLASS apply_tiff() if (thumb_offset) { fseek (ifp, thumb_offset, SEEK_SET); if (ljpeg_start (&jh, 1)) { - thumb_misc = jh.bits; - thumb_width = jh.wide; - thumb_height = jh.high; + if((unsigned)jh.bits<17 && (unsigned)jh.wide < 0x10000 && (unsigned)jh.high < 0x10000) + { + thumb_misc = jh.bits; + thumb_width = jh.wide; + thumb_height = jh.high; + } } } for (i=0; i < tiff_nifds; i++) { @@ -5816,7 +5828,8 @@ void CLASS apply_tiff() max_samp = tiff_ifd[i].samples; if (max_samp > 3) max_samp = 3; if ((tiff_ifd[i].comp != 6 || tiff_ifd[i].samples != 3) && - (tiff_ifd[i].width | tiff_ifd[i].height) < 0x10000 && + unsigned(tiff_ifd[i].width | tiff_ifd[i].height) < 0x10000 && + (unsigned)tiff_ifd[i].bps < 33 && (unsigned)tiff_ifd[i].samples < 13 && tiff_ifd[i].width*tiff_ifd[i].height > raw_width*raw_height) { raw_width = tiff_ifd[i].width; raw_height = tiff_ifd[i].height; @@ -5903,6 +5916,8 @@ void CLASS apply_tiff() is_raw = 0; for (i=0; i < tiff_nifds; i++) if (i != raw && tiff_ifd[i].samples == max_samp && + tiff_ifd[i].bps>0 && tiff_ifd[i].bps < 33 && + unsigned(tiff_ifd[i].width | tiff_ifd[i].height) < 0x10000 && tiff_ifd[i].width * tiff_ifd[i].height / (SQR(tiff_ifd[i].bps)+1) > thumb_width * thumb_height / (SQR(thumb_misc)+1) && tiff_ifd[i].comp != 34892) { debian/patches/libgif.patch0000664000000000000000000000265212253646253013111 0ustar Description Link against libgif instead of deprecated libungif Author: Sven Eckelmann --- diff --git a/codecs/Makefile b/codecs/Makefile index e596309850c46cae66fb0f2d2ddca6fca63bac81..43b6d99e27b23f7cdac1f6a4247fb5ab79591d93 100644 --- a/codecs/Makefile +++ b/codecs/Makefile @@ -18,8 +18,8 @@ else NOT_SRCS += png.cc endif -ifeq "$(WITHLIBUNGIF)" "1" -LDFLAGS += -lungif +ifeq "$(WITHLIBGIF)" "1" +LDFLAGS += -lgif else NOT_SRCS += gif.cc endif diff --git a/configure b/configure index 668f93974b6f87ae5916395ae5d338f88a2f25f9..a8d441533dda2401be3e816445522887b7500bb5 100755 --- a/configure +++ b/configure @@ -2,7 +2,7 @@ . config/functions -with_options="x11 freetype evas libjpeg libtiff libpng libungif jasper openexr expat lcms bardecode lua swig perl python php ruby" +with_options="x11 freetype evas libjpeg libtiff libpng libgif jasper openexr expat lcms bardecode lua swig perl python php ruby" feature_options="evasgl tga pcx static" TGA=1 # default to yes @@ -64,7 +64,7 @@ fi pkgcheck libjpeg header LIBJPEG cc jconfig.h pkgcheck libtiff header LIBTIFF c++ tiffconf.h tiffio.h # tiffio.hxx pkgcheck libpng pkg-config LIBPNG atleast 1.2 -pkgcheck libungif header LIBUNGIF c++ gif_lib.h +pkgcheck libgif header LIBGIF c++ gif_lib.h pkgcheck jasper header JASPER c++ jasper/jasper.h if pkgcheck expat header EXPAT c++ expat.h; then # just for the SVG parser var_append EXPATLIBS " " "-lexpat" debian/patches/agg-pic.patch0000664000000000000000000000101112253646253013150 0ustar Description: Use PIC version of static AGG library. Author: Jakub Wilk Forwarded: not-needed Last-Update: 2010-03-27 --- diff --git a/lib/Makefile b/lib/Makefile index 21497cc3c05a97e6f3db47ff258ae1633940130e..540a35ee243d2b8f97a67275b84fbf812e0f9d1f 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -9,7 +9,7 @@ DEPS = CPPFLAGS += $(LIBAGGINCS) LDFLAGS += $(LIBAGGLIBS) ifeq "$(WITHFREETYPE)" "1" -LDFLAGS += -laggfontfreetype +LDFLAGS += -laggfontfreetype_pic endif ifeq "$(WITHFREETYPE)" "1" debian/patches/agg-missing-includes.patch0000664000000000000000000000263412253646253015666 0ustar Description: Add several header includes to be able to link with system copy of AGG. See Debian bug #575620. Author: Jakub Wilk Forwarded: not-needed Last-Update: 2010-02-07 --- diff --git a/codecs/agg_svg_path_renderer.hh b/codecs/agg_svg_path_renderer.hh index 56321484c542ecc508ce44eaca6bfc8cfde8662a..1595eaa3be42697407378458123df329f6ccb3c2 100644 --- a/codecs/agg_svg_path_renderer.hh +++ b/codecs/agg_svg_path_renderer.hh @@ -19,6 +19,9 @@ #ifndef AGG_SVG_PATH_RENDERER_INCLUDED #define AGG_SVG_PATH_RENDERER_INCLUDED +#include +#include + #include "agg_path_storage.h" #include "agg_conv_transform.h" #include "agg_conv_stroke.h" diff --git a/codecs/svg.cc b/codecs/svg.cc index 7e4597de7480989a6917557381723ccf9dc44bda..ef287d5dfaf866fae9f3e21d6604db626c67af33 100644 --- a/codecs/svg.cc +++ b/codecs/svg.cc @@ -19,6 +19,9 @@ * Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com) */ +#include +#include + #include "agg_basics.h" #include "agg_rendering_buffer.h" #include "agg_rasterizer_scanline_aa.h" diff --git a/lib/agg.hh b/lib/agg.hh index f587d5cbe50677ed3a88a61f91782124423cb5cb..c3951325d34c19c57fa99b85206460d389211573 100644 --- a/lib/agg.hh +++ b/lib/agg.hh @@ -16,6 +16,8 @@ * copyright holder ExactCODE GmbH Germany. */ +#include + #include #include debian/patches/CVE-2013-1441.patch0000664000000000000000000000124612253646253013242 0ustar Description: exactimage: DoS, econvert crashes setjmp must be called before decoding an image using dcraw because it uses longjmp after an error. Author: Sven Eckelmann --- diff --git a/codecs/dcraw.cc b/codecs/dcraw.cc index 4fad376cf099a62497f4261d17db61fb4a513c60..9d21c49528fc2d65a6ef78ad1c8121aa886a453c 100644 --- a/codecs/dcraw.cc +++ b/codecs/dcraw.cc @@ -161,7 +161,11 @@ int DCRAWCodec::readImage (std::istream* stream, Image& im, const std::string& d if (use_camera_matrix < 0) use_camera_matrix = use_camera_wb; - + + // TODO: cleanup on failure + if (setjmp (failure)) + return false; + identify(); if (!is_raw) debian/patches/utility-timer-dead-code.patch0000664000000000000000000000215412253646253016276 0ustar Description: Disable dead code in utility/Timer.cc, as it is causing build failures on some architectures. Author: Jakub Wilk Forwarded: yes Last-Update: 2010-03-27 --- diff --git a/utility/Timer.cc b/utility/Timer.cc index 05ecab7044f772254c3d2448ea1dd3b43be47def..49dd98c55dfcc972742922d782fae7da8100c2c2 100644 --- a/utility/Timer.cc +++ b/utility/Timer.cc @@ -77,6 +77,8 @@ uint64_t Utility::TickTimer::PerSecond () const // --- +#if 0 /* dead code */ + Utility::TimebaseTimer::TimebaseTimer () { start_tick = Value (); @@ -185,3 +187,5 @@ uint64_t Utility::TimebaseTimer::PerSecond () const return per_second; } + +#endif diff --git a/utility/Timer.hh b/utility/Timer.hh index a769b0109a5ae024e2d47971cd3c6b21c7247cc9..5990f3aea21a1696a3ec8481385391c602e9bb37 100644 --- a/utility/Timer.hh +++ b/utility/Timer.hh @@ -97,7 +97,9 @@ namespace Utility struct tms m_times; }; #endif - + +#if 0 /* dead code */ + class TimebaseTimer { public: @@ -138,6 +140,8 @@ namespace Utility T m_timer; std::string m_text; }; + +#endif } // end namespace utility debian/patches/libjpeg8_compat.patch0000664000000000000000000007010112253646253014716 0ustar Description: Build jpeg functionality for libjpeg8 Bug-Debian: http://bugs.debian.org/679775 Author: Sven Eckelmann --- diff --git a/codecs/jpegint.h b/codecs/jpegint.h index 95b00d405caeca1dc971b37a94bbadc566f3074b..c0d5c142022830a8d52a96dc8c38051dffa8cc91 100644 --- a/codecs/jpegint.h +++ b/codecs/jpegint.h @@ -2,6 +2,7 @@ * jpegint.h * * Copyright (C) 1991-1997, Thomas G. Lane. + * Modified 1997-2011 by Guido Vollbeding. * This file is part of the Independent JPEG Group's software. * For conditions of distribution and use, see the accompanying README file. * @@ -99,14 +100,16 @@ struct jpeg_downsampler { }; /* Forward DCT (also controls coefficient quantization) */ +typedef JMETHOD(void, forward_DCT_ptr, + (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY sample_data, JBLOCKROW coef_blocks, + JDIMENSION start_row, JDIMENSION start_col, + JDIMENSION num_blocks)); + struct jpeg_forward_dct { JMETHOD(void, start_pass, (j_compress_ptr cinfo)); - /* perhaps this should be an array??? */ - JMETHOD(void, forward_DCT, (j_compress_ptr cinfo, - jpeg_component_info * compptr, - JSAMPARRAY sample_data, JBLOCKROW coef_blocks, - JDIMENSION start_row, JDIMENSION start_col, - JDIMENSION num_blocks)); + /* It is useful to allow each component to have a separate FDCT method. */ + forward_DCT_ptr forward_DCT[MAX_COMPONENTS]; }; /* Entropy encoding */ @@ -210,10 +213,6 @@ struct jpeg_entropy_decoder { JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)); - - /* This is here to share code between baseline and progressive decoders; */ - /* other modules probably should not use it */ - boolean insufficient_data; /* set TRUE after emitting warning */ }; /* Inverse DCT (also performs dequantization) */ @@ -303,7 +302,7 @@ struct jpeg_color_quantizer { #define jinit_downsampler jIDownsampler #define jinit_forward_dct jIFDCT #define jinit_huff_encoder jIHEncoder -#define jinit_phuff_encoder jIPHEncoder +#define jinit_arith_encoder jIAEncoder #define jinit_marker_writer jIMWriter #define jinit_master_decompress jIDMaster #define jinit_d_main_controller jIDMainC @@ -312,7 +311,7 @@ struct jpeg_color_quantizer { #define jinit_input_controller jIInCtlr #define jinit_marker_reader jIMReader #define jinit_huff_decoder jIHDecoder -#define jinit_phuff_decoder jIPHDecoder +#define jinit_arith_decoder jIADecoder #define jinit_inverse_dct jIIDCT #define jinit_upsampler jIUpsampler #define jinit_color_deconverter jIDColor @@ -322,14 +321,41 @@ struct jpeg_color_quantizer { #define jinit_memory_mgr jIMemMgr #define jdiv_round_up jDivRound #define jround_up jRound +#define jzero_far jZeroFar #define jcopy_sample_rows jCopySamples #define jcopy_block_row jCopyBlocks -#define jzero_far jZeroFar #define jpeg_zigzag_order jZIGTable #define jpeg_natural_order jZAGTable +#define jpeg_natural_order7 jZAG7Table +#define jpeg_natural_order6 jZAG6Table +#define jpeg_natural_order5 jZAG5Table +#define jpeg_natural_order4 jZAG4Table +#define jpeg_natural_order3 jZAG3Table +#define jpeg_natural_order2 jZAG2Table +#define jpeg_aritab jAriTab #endif /* NEED_SHORT_EXTERNAL_NAMES */ +/* On normal machines we can apply MEMCOPY() and MEMZERO() to sample arrays + * and coefficient-block arrays. This won't work on 80x86 because the arrays + * are FAR and we're assuming a small-pointer memory model. However, some + * DOS compilers provide far-pointer versions of memcpy() and memset() even + * in the small-model libraries. These will be used if USE_FMEM is defined. + * Otherwise, the routines in jutils.c do it the hard way. + */ + +#ifndef NEED_FAR_POINTERS /* normal case, same as regular macro */ +#define FMEMZERO(target,size) MEMZERO(target,size) +#else /* 80x86 case */ +#ifdef USE_FMEM +#define FMEMZERO(target,size) _fmemset((void FAR *)(target), 0, (size_t)(size)) +#else +EXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero)); +#define FMEMZERO(target,size) jzero_far(target, size) +#endif +#endif + + /* Compression module initialization routines */ EXTERN(void) jinit_compress_master JPP((j_compress_ptr cinfo)); EXTERN(void) jinit_c_master_control JPP((j_compress_ptr cinfo, @@ -344,7 +370,7 @@ EXTERN(void) jinit_color_converter JPP((j_compress_ptr cinfo)); EXTERN(void) jinit_downsampler JPP((j_compress_ptr cinfo)); EXTERN(void) jinit_forward_dct JPP((j_compress_ptr cinfo)); EXTERN(void) jinit_huff_encoder JPP((j_compress_ptr cinfo)); -EXTERN(void) jinit_phuff_encoder JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_arith_encoder JPP((j_compress_ptr cinfo)); EXTERN(void) jinit_marker_writer JPP((j_compress_ptr cinfo)); /* Decompression module initialization routines */ EXTERN(void) jinit_master_decompress JPP((j_decompress_ptr cinfo)); @@ -357,7 +383,7 @@ EXTERN(void) jinit_d_post_controller JPP((j_decompress_ptr cinfo, EXTERN(void) jinit_input_controller JPP((j_decompress_ptr cinfo)); EXTERN(void) jinit_marker_reader JPP((j_decompress_ptr cinfo)); EXTERN(void) jinit_huff_decoder JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_phuff_decoder JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_arith_decoder JPP((j_decompress_ptr cinfo)); EXTERN(void) jinit_inverse_dct JPP((j_decompress_ptr cinfo)); EXTERN(void) jinit_upsampler JPP((j_decompress_ptr cinfo)); EXTERN(void) jinit_color_deconverter JPP((j_decompress_ptr cinfo)); @@ -375,12 +401,20 @@ EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row, int num_rows, JDIMENSION num_cols)); EXTERN(void) jcopy_block_row JPP((JBLOCKROW input_row, JBLOCKROW output_row, JDIMENSION num_blocks)); -EXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero)); /* Constant tables in jutils.c */ #if 0 /* This table is not actually needed in v6a */ extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */ #endif extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */ +extern const int jpeg_natural_order7[]; /* zz to natural order for 7x7 block */ +extern const int jpeg_natural_order6[]; /* zz to natural order for 6x6 block */ +extern const int jpeg_natural_order5[]; /* zz to natural order for 5x5 block */ +extern const int jpeg_natural_order4[]; /* zz to natural order for 4x4 block */ +extern const int jpeg_natural_order3[]; /* zz to natural order for 3x3 block */ +extern const int jpeg_natural_order2[]; /* zz to natural order for 2x2 block */ + +/* Arithmetic coding probability estimation tables in jaricom.c */ +extern const INT32 jpeg_aritab[]; /* Suppress undefined-structure complaints if necessary. */ diff --git a/codecs/transupp.c b/codecs/transupp.c index e6bb936a5b05aa608f5440ff6e92c6dc79c04c01..016f383d4f388db01840dff72e2dfe43c1b7e8ef 100644 --- a/codecs/transupp.c +++ b/codecs/transupp.c @@ -1,7 +1,7 @@ /* * transupp.c * - * Copyright (C) 1997-2001, Thomas G. Lane. + * Copyright (C) 1997-2011, Thomas G. Lane, Guido Vollbeding. * This file is part of the Independent JPEG Group's software. * For conditions of distribution and use, see the accompanying README file. * @@ -133,7 +133,8 @@ do_flip_h_no_crop (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, * mirroring by changing the signs of odd-numbered columns. * Partial iMCUs at the right edge are left untouched. */ - MCU_cols = srcinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE); + MCU_cols = srcinfo->output_width / + (dstinfo->max_h_samp_factor * dstinfo->min_DCT_h_scaled_size); for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; @@ -198,7 +199,8 @@ do_flip_h (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, * different rows of a single virtual array simultaneously. Otherwise, * this is essentially the same as the routine above. */ - MCU_cols = srcinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE); + MCU_cols = srcinfo->output_width / + (dstinfo->max_h_samp_factor * dstinfo->min_DCT_h_scaled_size); for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; @@ -262,7 +264,8 @@ do_flip_v (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, * of odd-numbered rows. * Partial iMCUs at the bottom edge are copied verbatim. */ - MCU_rows = srcinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE); + MCU_rows = srcinfo->output_height / + (dstinfo->max_v_samp_factor * dstinfo->min_DCT_v_scaled_size); for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; @@ -389,7 +392,8 @@ do_rot_90 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, * at the (output) right edge properly. They just get transposed and * not mirrored. */ - MCU_cols = srcinfo->image_height / (dstinfo->max_h_samp_factor * DCTSIZE); + MCU_cols = srcinfo->output_height / + (dstinfo->max_h_samp_factor * dstinfo->min_DCT_h_scaled_size); for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; @@ -469,7 +473,8 @@ do_rot_270 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, * at the (output) bottom edge properly. They just get transposed and * not mirrored. */ - MCU_rows = srcinfo->image_width / (dstinfo->max_v_samp_factor * DCTSIZE); + MCU_rows = srcinfo->output_width / + (dstinfo->max_v_samp_factor * dstinfo->min_DCT_v_scaled_size); for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; @@ -536,8 +541,10 @@ do_rot_180 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, JCOEFPTR src_ptr, dst_ptr; jpeg_component_info *compptr; - MCU_cols = srcinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE); - MCU_rows = srcinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE); + MCU_cols = srcinfo->output_width / + (dstinfo->max_h_samp_factor * dstinfo->min_DCT_h_scaled_size); + MCU_rows = srcinfo->output_height / + (dstinfo->max_v_samp_factor * dstinfo->min_DCT_v_scaled_size); for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; @@ -645,8 +652,10 @@ do_transverse (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, JCOEFPTR src_ptr, dst_ptr; jpeg_component_info *compptr; - MCU_cols = srcinfo->image_height / (dstinfo->max_h_samp_factor * DCTSIZE); - MCU_rows = srcinfo->image_width / (dstinfo->max_v_samp_factor * DCTSIZE); + MCU_cols = srcinfo->output_height / + (dstinfo->max_h_samp_factor * dstinfo->min_DCT_h_scaled_size); + MCU_rows = srcinfo->output_width / + (dstinfo->max_v_samp_factor * dstinfo->min_DCT_v_scaled_size); for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; @@ -762,7 +771,7 @@ jt_read_integer (const char ** strptr, JDIMENSION * result) * The routine returns TRUE if the spec string is valid, FALSE if not. * * The crop spec string should have the format - * x{+-}{+-} + * [f]x[f]{+-}{+-} * where width, height, xoffset, and yoffset are unsigned integers. * Each of the elements can be omitted to indicate a default value. * (A weakness of this style is that it is not possible to omit xoffset @@ -784,14 +793,22 @@ jtransform_parse_crop_spec (jpeg_transform_info *info, const char *spec) /* fetch width */ if (! jt_read_integer(&spec, &info->crop_width)) return FALSE; - info->crop_width_set = JCROP_POS; + if (*spec == 'f' || *spec == 'F') { + spec++; + info->crop_width_set = JCROP_FORCE; + } else + info->crop_width_set = JCROP_POS; } - if (*spec == 'x' || *spec == 'X') { + if (*spec == 'x' || *spec == 'X') { /* fetch height */ spec++; if (! jt_read_integer(&spec, &info->crop_height)) return FALSE; - info->crop_height_set = JCROP_POS; + if (*spec == 'f' || *spec == 'F') { + spec++; + info->crop_height_set = JCROP_FORCE; + } else + info->crop_height_set = JCROP_POS; } if (*spec == '+' || *spec == '-') { /* fetch xoffset */ @@ -822,10 +839,10 @@ trim_right_edge (jpeg_transform_info *info, JDIMENSION full_width) { JDIMENSION MCU_cols; - MCU_cols = info->output_width / (info->max_h_samp_factor * DCTSIZE); + MCU_cols = info->output_width / info->iMCU_sample_width; if (MCU_cols > 0 && info->x_crop_offset + MCU_cols == - full_width / (info->max_h_samp_factor * DCTSIZE)) - info->output_width = MCU_cols * (info->max_h_samp_factor * DCTSIZE); + full_width / info->iMCU_sample_width) + info->output_width = MCU_cols * info->iMCU_sample_width; } LOCAL(void) @@ -833,10 +850,10 @@ trim_bottom_edge (jpeg_transform_info *info, JDIMENSION full_height) { JDIMENSION MCU_rows; - MCU_rows = info->output_height / (info->max_v_samp_factor * DCTSIZE); + MCU_rows = info->output_height / info->iMCU_sample_height; if (MCU_rows > 0 && info->y_crop_offset + MCU_rows == - full_height / (info->max_v_samp_factor * DCTSIZE)) - info->output_height = MCU_rows * (info->max_v_samp_factor * DCTSIZE); + full_height / info->iMCU_sample_height) + info->output_height = MCU_rows * info->iMCU_sample_height; } @@ -852,59 +869,89 @@ trim_bottom_edge (jpeg_transform_info *info, JDIMENSION full_height) * Hence, this routine must be called after jpeg_read_header (which reads * the image dimensions) and before jpeg_read_coefficients (which realizes * the source's virtual arrays). + * + * This function returns FALSE right away if -perfect is given + * and transformation is not perfect. Otherwise returns TRUE. */ -GLOBAL(void) +GLOBAL(boolean) jtransform_request_workspace (j_decompress_ptr srcinfo, jpeg_transform_info *info) { - jvirt_barray_ptr *coef_arrays = NULL; + jvirt_barray_ptr *coef_arrays; boolean need_workspace, transpose_it; jpeg_component_info *compptr; - JDIMENSION xoffset, yoffset, width_in_iMCUs, height_in_iMCUs; + JDIMENSION xoffset, yoffset; + JDIMENSION width_in_iMCUs, height_in_iMCUs; JDIMENSION width_in_blocks, height_in_blocks; int ci, h_samp_factor, v_samp_factor; /* Determine number of components in output image */ if (info->force_grayscale && srcinfo->jpeg_color_space == JCS_YCbCr && - srcinfo->num_components == 3) { + srcinfo->num_components == 3) /* We'll only process the first component */ info->num_components = 1; - } else { + else /* Process all the components */ info->num_components = srcinfo->num_components; + + /* Compute output image dimensions and related values. */ + jpeg_core_output_dimensions(srcinfo); + + /* Return right away if -perfect is given and transformation is not perfect. + */ + if (info->perfect) { + if (info->num_components == 1) { + if (!jtransform_perfect_transform(srcinfo->output_width, + srcinfo->output_height, + srcinfo->min_DCT_h_scaled_size, + srcinfo->min_DCT_v_scaled_size, + info->transform)) + return FALSE; + } else { + if (!jtransform_perfect_transform(srcinfo->output_width, + srcinfo->output_height, + srcinfo->max_h_samp_factor * srcinfo->min_DCT_h_scaled_size, + srcinfo->max_v_samp_factor * srcinfo->min_DCT_v_scaled_size, + info->transform)) + return FALSE; + } } + /* If there is only one output component, force the iMCU size to be 1; * else use the source iMCU size. (This allows us to do the right thing * when reducing color to grayscale, and also provides a handy way of * cleaning up "funny" grayscale images whose sampling factors are not 1x1.) */ - switch (info->transform) { case JXFORM_TRANSPOSE: case JXFORM_TRANSVERSE: case JXFORM_ROT_90: case JXFORM_ROT_270: - info->output_width = srcinfo->image_height; - info->output_height = srcinfo->image_width; + info->output_width = srcinfo->output_height; + info->output_height = srcinfo->output_width; if (info->num_components == 1) { - info->max_h_samp_factor = 1; - info->max_v_samp_factor = 1; + info->iMCU_sample_width = srcinfo->min_DCT_v_scaled_size; + info->iMCU_sample_height = srcinfo->min_DCT_h_scaled_size; } else { - info->max_h_samp_factor = srcinfo->max_v_samp_factor; - info->max_v_samp_factor = srcinfo->max_h_samp_factor; + info->iMCU_sample_width = + srcinfo->max_v_samp_factor * srcinfo->min_DCT_v_scaled_size; + info->iMCU_sample_height = + srcinfo->max_h_samp_factor * srcinfo->min_DCT_h_scaled_size; } break; default: - info->output_width = srcinfo->image_width; - info->output_height = srcinfo->image_height; + info->output_width = srcinfo->output_width; + info->output_height = srcinfo->output_height; if (info->num_components == 1) { - info->max_h_samp_factor = 1; - info->max_v_samp_factor = 1; + info->iMCU_sample_width = srcinfo->min_DCT_h_scaled_size; + info->iMCU_sample_height = srcinfo->min_DCT_v_scaled_size; } else { - info->max_h_samp_factor = srcinfo->max_h_samp_factor; - info->max_v_samp_factor = srcinfo->max_v_samp_factor; + info->iMCU_sample_width = + srcinfo->max_h_samp_factor * srcinfo->min_DCT_h_scaled_size; + info->iMCU_sample_height = + srcinfo->max_v_samp_factor * srcinfo->min_DCT_v_scaled_size; } break; } @@ -920,7 +967,7 @@ jtransform_request_workspace (j_decompress_ptr srcinfo, info->crop_yoffset = 0; /* default to +0 */ if (info->crop_xoffset >= info->output_width || info->crop_yoffset >= info->output_height) - ERREXIT(srcinfo, "Invalid crop request"); /* was: JERR_BAD_CROP_SPEC */ + ERREXIT(srcinfo, JERR_BAD_CROP_SPEC); if (info->crop_width_set == JCROP_UNSET) info->crop_width = info->output_width - info->crop_xoffset; if (info->crop_height_set == JCROP_UNSET) @@ -930,7 +977,7 @@ jtransform_request_workspace (j_decompress_ptr srcinfo, info->crop_height <= 0 || info->crop_height > info->output_height || info->crop_xoffset > info->output_width - info->crop_width || info->crop_yoffset > info->output_height - info->crop_height) - ERREXIT(srcinfo, "Invalid crop request"); /* was: JERR_BAD_CROP_SPEC */ + ERREXIT(srcinfo, JERR_BAD_CROP_SPEC); /* Convert negative crop offsets into regular offsets */ if (info->crop_xoffset_set == JCROP_NEG) xoffset = info->output_width - info->crop_width - info->crop_xoffset; @@ -941,13 +988,19 @@ jtransform_request_workspace (j_decompress_ptr srcinfo, else yoffset = info->crop_yoffset; /* Now adjust so that upper left corner falls at an iMCU boundary */ - info->output_width = - info->crop_width + (xoffset % (info->max_h_samp_factor * DCTSIZE)); - info->output_height = - info->crop_height + (yoffset % (info->max_v_samp_factor * DCTSIZE)); + if (info->crop_width_set == JCROP_FORCE) + info->output_width = info->crop_width; + else + info->output_width = + info->crop_width + (xoffset % info->iMCU_sample_width); + if (info->crop_height_set == JCROP_FORCE) + info->output_height = info->crop_height; + else + info->output_height = + info->crop_height + (yoffset % info->iMCU_sample_height); /* Save x/y offsets measured in iMCUs */ - info->x_crop_offset = xoffset / (info->max_h_samp_factor * DCTSIZE); - info->y_crop_offset = yoffset / (info->max_v_samp_factor * DCTSIZE); + info->x_crop_offset = xoffset / info->iMCU_sample_width; + info->y_crop_offset = yoffset / info->iMCU_sample_height; } else { info->x_crop_offset = 0; info->y_crop_offset = 0; @@ -966,14 +1019,14 @@ jtransform_request_workspace (j_decompress_ptr srcinfo, break; case JXFORM_FLIP_H: if (info->trim) - trim_right_edge(info, srcinfo->image_width); + trim_right_edge(info, srcinfo->output_width); if (info->y_crop_offset != 0) need_workspace = TRUE; /* do_flip_h_no_crop doesn't need a workspace array */ break; case JXFORM_FLIP_V: if (info->trim) - trim_bottom_edge(info, srcinfo->image_height); + trim_bottom_edge(info, srcinfo->output_height); /* Need workspace arrays having same dimensions as source image. */ need_workspace = TRUE; break; @@ -985,8 +1038,8 @@ jtransform_request_workspace (j_decompress_ptr srcinfo, break; case JXFORM_TRANSVERSE: if (info->trim) { - trim_right_edge(info, srcinfo->image_height); - trim_bottom_edge(info, srcinfo->image_width); + trim_right_edge(info, srcinfo->output_height); + trim_bottom_edge(info, srcinfo->output_width); } /* Need workspace arrays having transposed dimensions. */ need_workspace = TRUE; @@ -994,22 +1047,22 @@ jtransform_request_workspace (j_decompress_ptr srcinfo, break; case JXFORM_ROT_90: if (info->trim) - trim_right_edge(info, srcinfo->image_height); + trim_right_edge(info, srcinfo->output_height); /* Need workspace arrays having transposed dimensions. */ need_workspace = TRUE; transpose_it = TRUE; break; case JXFORM_ROT_180: if (info->trim) { - trim_right_edge(info, srcinfo->image_width); - trim_bottom_edge(info, srcinfo->image_height); + trim_right_edge(info, srcinfo->output_width); + trim_bottom_edge(info, srcinfo->output_height); } /* Need workspace arrays having same dimensions as source image. */ need_workspace = TRUE; break; case JXFORM_ROT_270: if (info->trim) - trim_bottom_edge(info, srcinfo->image_width); + trim_bottom_edge(info, srcinfo->output_width); /* Need workspace arrays having transposed dimensions. */ need_workspace = TRUE; transpose_it = TRUE; @@ -1026,10 +1079,10 @@ jtransform_request_workspace (j_decompress_ptr srcinfo, SIZEOF(jvirt_barray_ptr) * info->num_components); width_in_iMCUs = (JDIMENSION) jdiv_round_up((long) info->output_width, - (long) (info->max_h_samp_factor * DCTSIZE)); + (long) info->iMCU_sample_width); height_in_iMCUs = (JDIMENSION) jdiv_round_up((long) info->output_height, - (long) (info->max_v_samp_factor * DCTSIZE)); + (long) info->iMCU_sample_height); for (ci = 0; ci < info->num_components; ci++) { compptr = srcinfo->comp_info + ci; if (info->num_components == 1) { @@ -1048,9 +1101,11 @@ jtransform_request_workspace (j_decompress_ptr srcinfo, ((j_common_ptr) srcinfo, JPOOL_IMAGE, FALSE, width_in_blocks, height_in_blocks, (JDIMENSION) v_samp_factor); } - } + info->workspace_coef_arrays = coef_arrays; + } else + info->workspace_coef_arrays = NULL; - info->workspace_coef_arrays = coef_arrays; + return TRUE; } @@ -1062,8 +1117,17 @@ transpose_critical_parameters (j_compress_ptr dstinfo) int tblno, i, j, ci, itemp; jpeg_component_info *compptr; JQUANT_TBL *qtblptr; + JDIMENSION jtemp; UINT16 qtemp; + /* Transpose image dimensions */ + jtemp = dstinfo->image_width; + dstinfo->image_width = dstinfo->image_height; + dstinfo->image_height = jtemp; + itemp = dstinfo->min_DCT_h_scaled_size; + dstinfo->min_DCT_h_scaled_size = dstinfo->min_DCT_v_scaled_size; + dstinfo->min_DCT_v_scaled_size = itemp; + /* Transpose sampling factors */ for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; @@ -1296,10 +1360,10 @@ jtransform_adjust_parameters (j_decompress_ptr srcinfo, } /* Correct the destination's image dimensions as necessary - * for crop and rotate/flip operations. + * for rotate/flip, resize, and crop operations. */ - dstinfo->image_width = info->output_width; - dstinfo->image_height = info->output_height; + dstinfo->jpeg_width = info->output_width; + dstinfo->jpeg_height = info->output_height; /* Transpose destination image parameters */ switch (info->transform) { @@ -1326,12 +1390,12 @@ jtransform_adjust_parameters (j_decompress_ptr srcinfo, /* Suppress output of JFIF marker */ dstinfo->write_JFIF_header = FALSE; /* Adjust Exif image parameters */ - if (dstinfo->image_width != srcinfo->image_width || - dstinfo->image_height != srcinfo->image_height) + if (dstinfo->jpeg_width != srcinfo->image_width || + dstinfo->jpeg_height != srcinfo->image_height) /* Align data segment to start of TIFF structure for parsing */ adjust_exif_parameters(srcinfo->marker_list->data + 6, srcinfo->marker_list->data_length - 6, - dstinfo->image_width, dstinfo->image_height); + dstinfo->jpeg_width, dstinfo->jpeg_height); } /* Return the appropriate output data set */ @@ -1415,8 +1479,8 @@ jtransform_execute_transform (j_decompress_ptr srcinfo, * (after reading source header): * image_width = cinfo.image_width * image_height = cinfo.image_height - * MCU_width = cinfo.max_h_samp_factor * DCTSIZE - * MCU_height = cinfo.max_v_samp_factor * DCTSIZE + * MCU_width = cinfo.max_h_samp_factor * cinfo.block_size + * MCU_height = cinfo.max_v_samp_factor * cinfo.block_size * Result: * TRUE = perfect transformation possible * FALSE = perfect transformation not possible diff --git a/codecs/transupp.h b/codecs/transupp.h index 981b1cee7d61235d5537289848cd54e0edbfaac2..9aa0af385a8d0a749a53606c649aa0a34fc93845 100644 --- a/codecs/transupp.h +++ b/codecs/transupp.h @@ -1,7 +1,7 @@ /* * transupp.h * - * Copyright (C) 1997-2001, Thomas G. Lane. + * Copyright (C) 1997-2011, Thomas G. Lane, Guido Vollbeding. * This file is part of the Independent JPEG Group's software. * For conditions of distribution and use, see the accompanying README file. * @@ -57,10 +57,16 @@ * corner up and/or left to make it so, simultaneously increasing the region * dimensions to keep the lower right crop corner unchanged. (Thus, the * output image covers at least the requested region, but may cover more.) + * The adjustment of the region dimensions may be optionally disabled. * - * If both crop and a rotate/flip transform are requested, the crop is applied - * last --- that is, the crop region is specified in terms of the destination - * image. + * We also provide a lossless-resize option, which is kind of a lossless-crop + * operation in the DCT coefficient block domain - it discards higher-order + * coefficients and losslessly preserves lower-order coefficients of a + * sub-block. + * + * Rotate/flip transform, resize, and crop can be requested together in a + * single invocation. The crop is applied last --- that is, the crop region + * is specified in terms of the destination image after transform/resize. * * We also offer a "force to grayscale" option, which simply discards the * chrominance channels of a YCbCr image. This is lossless in the sense that @@ -101,13 +107,15 @@ typedef enum { /* * Codes for crop parameters, which can individually be unspecified, - * positive, or negative. (Negative width or height makes no sense, though.) + * positive or negative for xoffset or yoffset, + * positive or forced for width or height. */ typedef enum { - JCROP_UNSET, - JCROP_POS, - JCROP_NEG + JCROP_UNSET, + JCROP_POS, + JCROP_NEG, + JCROP_FORCE } JCROP_CODE; /* @@ -128,9 +136,9 @@ typedef struct { * These can be filled in by jtransform_parse_crop_spec(). */ JDIMENSION crop_width; /* Width of selected region */ - JCROP_CODE crop_width_set; + JCROP_CODE crop_width_set; /* (forced disables adjustment) */ JDIMENSION crop_height; /* Height of selected region */ - JCROP_CODE crop_height_set; + JCROP_CODE crop_height_set; /* (forced disables adjustment) */ JDIMENSION crop_xoffset; /* X offset of selected region */ JCROP_CODE crop_xoffset_set; /* (negative measures from right edge) */ JDIMENSION crop_yoffset; /* Y offset of selected region */ @@ -143,8 +151,8 @@ typedef struct { JDIMENSION output_height; JDIMENSION x_crop_offset; /* destination crop offsets measured in iMCUs */ JDIMENSION y_crop_offset; - int max_h_samp_factor; /* destination iMCU size */ - int max_v_samp_factor; + int iMCU_sample_width; /* destination iMCU size */ + int iMCU_sample_height; } jpeg_transform_info; @@ -154,7 +162,7 @@ typedef struct { EXTERN(boolean) jtransform_parse_crop_spec JPP((jpeg_transform_info *info, const char *spec)); /* Request any required workspace */ -EXTERN(void) jtransform_request_workspace +EXTERN(boolean) jtransform_request_workspace JPP((j_decompress_ptr srcinfo, jpeg_transform_info *info)); /* Adjust output image parameters */ EXTERN(jvirt_barray_ptr *) jtransform_adjust_parameters debian/patches/series0000664000000000000000000000043612253646253012047 0ustar makefile-cflags.patch agg-missing-includes.patch agg-pic.patch abs-int64_t.patch utility-timer-dead-code.patch libpng15.patch libjpeg8_compat.patch verbose_build.patch decode_before_read_stride.patch gcc_48_dcraw_infinite_loop.patch CVE-2013-1438.patch CVE-2013-1441.patch libgif.patch debian/patches/decode_before_read_stride.patch0000664000000000000000000000272512253646253016770 0ustar Description: Decode image before accessing the stride attribute for rotation Bug-Debian: http://bugs.debian.org/523948 Author: Sven Eckelmann --- diff --git a/lib/rotate.cc b/lib/rotate.cc index 86c639e4fa7cbd0ad158b785184b258300dac691..4c05ad6c8a052b59a53f2807189b4935e90aa230 100644 --- a/lib/rotate.cc +++ b/lib/rotate.cc @@ -33,9 +33,9 @@ void flipX (Image& image) if (!image.isModified() && image.getCodec()) if (image.getCodec()->flipX(image)) return; - - const int stride = image.stride(); + uint8_t* data = image.getRawData(); + const int stride = image.stride(); switch (image.spp * image.bps) { case 1: @@ -103,9 +103,9 @@ void flipY (Image& image) if (!image.isModified() && image.getCodec()) if (image.getCodec()->flipY(image)) return; - - const unsigned int bytes = image.stride(); + uint8_t* data = image.getRawData(); + const unsigned int bytes = image.stride(); for (int y = 0; y < image.h / 2; ++y) { int y2 = image.h - y - 1; @@ -128,10 +128,9 @@ void rot90 (Image& image, int angle) bool cw = false; // clock-wise if (angle == 90) cw = true; // else 270 or -90 or whatever and thus counter cw - - int rot_stride = (image.h * image.spp * image.bps + 7) / 8; uint8_t* data = image.getRawData(); + int rot_stride = (image.h * image.spp * image.bps + 7) / 8; uint8_t* rot_data = (uint8_t*) malloc(rot_stride * image.w); switch (image.spp * image.bps) debian/patches/makefile-cflags.patch0000664000000000000000000000112312253646253014657 0ustar Description: Respect CFLAGS from the environment. Author: Jakub Wilk Forwarded: not-needed Last-Update: 2010-03-27 --- diff --git a/Makefile b/Makefile index d4e3cce3dabb886182d7c7337f74b38c7d401641..8b2c69dd3008f16b4e37364eadcd677cfbf5c557 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,8 @@ include utility/Makefile X_BUILD_IMPLICIT=1 # -s silcently corrupts binaries on OS X, sigh -ReneR -CFLAGS = -Wall -O2 -CXXFLAGS = -Wall -O2 -Wno-sign-compare +CFLAGS ?= -Wall -O2 +CXXFLAGS = $(CFLAGS) -Wno-sign-compare #CFLAGS = -Wall -O0 -ggdb #CXXFLAGS = -Wall -O0 -ggdb debian/patches/gcc_48_dcraw_infinite_loop.patch0000664000000000000000000001013712253646253017017 0ustar Description: Avoid infinite loops generated by GCC 4.8 caused by undefined behaviour GCC 4.8 uses an aggressive loop optimizer which can cause unexpected runtime behavior when the code tries to access memory in an incorrect way. Author: Sven Eckelmann Forwarded: yes --- diff --git a/codecs/dcraw.h b/codecs/dcraw.h index 1d7452a55fa621bb9ccb79dc50efd65bc541e4ae..476f3a2fac6264f6a07804c2680c249687168e7d 100644 --- a/codecs/dcraw.h +++ b/codecs/dcraw.h @@ -1948,6 +1948,8 @@ void CLASS quicktake_100_load_raw() #define PREDICTOR (c ? (buf[c][y-1][x] + buf[c][y][x+1]) / 2 \ : (buf[c][y-1][x+1] + 2*buf[c][y-1][x] + buf[c][y][x+1]) / 4) +#define ARRAY_SIZE(_array) (sizeof(_array) / sizeof((_array)[0])) + void CLASS kodak_radc_load_raw() { static const char src[] = { @@ -1986,8 +1988,12 @@ void CLASS kodak_radc_load_raw() s = kodak_cbpp == 243 ? 2 : 3; FORC(256) huff[18][c] = (8-s) << 8 | c >> s << s | 1 << (s-1); getbits(-1); - for (i=0; i < sizeof(buf)/sizeof(short); i++) - buf[0][0][i] = 2048; + for (c=0; c < ARRAY_SIZE(buf); c++) { + for (y=0; y < ARRAY_SIZE(buf[0]); y++) { + for (x=0; y < ARRAY_SIZE(buf[0][0]); x++) + buf[c][y][x] = 2048; + } + } for (row=0; row < height; row+=4) { FORC3 mul[c] = getbits(6); FORC3 { @@ -3092,9 +3098,11 @@ void CLASS foveon_interpolate() black = (float (*)[3]) calloc (height, sizeof *black); for (row=0; row < height; row++) { - for (i=0; i < 6; i++) - ddft[0][0][i] = ddft[1][0][i] + - row / (height-1.0) * (ddft[2][0][i] - ddft[1][0][i]); + for (c=0; c < ARRAY_SIZE(ddft[0]); c++) { + for (i=0; i < ARRAY_SIZE(ddft[0][0]); i++) + ddft[0][c][i] = ddft[1][c][i] + + row / (height-1.0) * (ddft[2][c][i] - ddft[1][c][i]); + } FORC3 black[row][c] = ( foveon_avg (image[row*width]+c, dscr[0], cfilt) + foveon_avg (image[row*width]+c, dscr[1], cfilt) * 3 @@ -3138,9 +3146,11 @@ void CLASS foveon_interpolate() FORC3 black[row][c] += fsum[c]/2 + total[c]/(total[3]*100.0); for (row=0; row < height; row++) { - for (i=0; i < 6; i++) - ddft[0][0][i] = ddft[1][0][i] + - row / (height-1.0) * (ddft[2][0][i] - ddft[1][0][i]); + for (c=0; c < ARRAY_SIZE(ddft[0]); c++) { + for (i=0; i < ARRAY_SIZE(ddft[0][0]); i++) + ddft[0][c][i] = ddft[1][c][i] + + row / (height-1.0) * (ddft[2][c][i] - ddft[1][c][i]); + } pix = image[row*width]; memcpy (prev, pix, sizeof prev); frow = row / (height-1.0) * (dim[2]-1); @@ -5208,8 +5218,10 @@ void CLASS parse_mos (int offset) strcpy (model, mod[i]); } if (!strcmp(data,"icc_camera_to_tone_matrix")) { - for (i=0; i < 9; i++) - romm_cam[0][i] = int_to_float(get4()); + for (c=0; c < ARRAY_SIZE(romm_cam); c++) { + for (i=0; i < ARRAY_SIZE(romm_cam[0]); i++) + romm_cam[c][i] = int_to_float(get4()); + } romm_coeff (romm_cam); } if (!strcmp(data,"CaptProf_color_matrix")) { @@ -6235,8 +6247,10 @@ void CLASS parse_phase_one (int base) switch (tag) { case 0x100: flip = "0653"[data & 3]-'0'; break; case 0x106: - for (i=0; i < 9; i++) - romm_cam[0][i] = getreal(11); + for (c=0; c < ARRAY_SIZE(romm_cam); c++) { + for (i=0; i < ARRAY_SIZE(romm_cam[0]); i++) + romm_cam[c][i] = getreal(11); + } romm_coeff (romm_cam); break; case 0x107: @@ -7376,7 +7390,7 @@ void CLASS adobe_coeff (const char *make, const char *model) }; double cam_xyz[4][3]; char name[130]; - int i, j; + int i, j, c; sprintf (name, "%s %s", make, model); for (i=0; i < sizeof table / sizeof *table; i++) @@ -7384,8 +7398,10 @@ void CLASS adobe_coeff (const char *make, const char *model) if (table[i].black) black = (ushort) table[i].black; if (table[i].maximum) maximum = (ushort) table[i].maximum; if (table[i].trans[0]) { - for (j=0; j < 12; j++) - cam_xyz[0][j] = table[i].trans[j] / 10000.0; + for (c=0; c < ARRAY_SIZE(cam_xyz); c++) { + for (j=0; j < ARRAY_SIZE(cam_xyz[0]); j++) + cam_xyz[c][j] = table[i].trans[c * ARRAY_SIZE(cam_xyz[0]) + j] / 10000.0; + } cam_xyz_coeff (cam_xyz); } break; debian/patches/libpng15.patch0000664000000000000000000001011512253646253013267 0ustar Description: Fix FTBFS with libpng 1.5 Author: Nobuhiro Iwamatsu Reviewed-by: Ralf Treinen Bug-Debian: #635745 --- diff --git a/codecs/png.cc b/codecs/png.cc index be70a53630710759194b56179b842c2cbba38823..ec5b16f9329d29239a770742255bec13147c1184 100644 --- a/codecs/png.cc +++ b/codecs/png.cc @@ -17,6 +17,7 @@ #include #include +#include #include @@ -58,7 +59,7 @@ int PNGCodec::readImage (std::istream* stream, Image& image, const std::string& png_structp png_ptr; png_infop info_ptr; png_uint_32 width, height; - int bit_depth, color_type, interlace_type; + int bit_depth, color_type, interlace_type, num_trans; png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL /*user_error_ptr*/, @@ -71,7 +72,7 @@ int PNGCodec::readImage (std::istream* stream, Image& image, const std::string& /* Allocate/initialize the memory for image information. REQUIRED. */ info_ptr = png_create_info_struct(png_ptr); if (info_ptr == NULL) { - png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL); + png_destroy_read_struct(&png_ptr, NULL, NULL); return 0; } @@ -82,7 +83,7 @@ int PNGCodec::readImage (std::istream* stream, Image& image, const std::string& if (setjmp(png_jmpbuf(png_ptr))) { /* Free all of the memory associated with the png_ptr and info_ptr */ - png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL); + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); /* If we get here, we had a problem reading the file */ return 0; } @@ -99,13 +100,13 @@ int PNGCodec::readImage (std::istream* stream, Image& image, const std::string& png_read_info (png_ptr, info_ptr); png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, - &interlace_type, int_p_NULL, int_p_NULL); + &interlace_type, NULL, NULL); image.w = width; image.h = height; image.bps = bit_depth; - image.spp = info_ptr->channels; - + image.spp = png_get_channels(png_ptr, info_ptr); + png_uint_32 res_x, res_y; res_x = png_get_x_pixels_per_meter(png_ptr, info_ptr); res_y = png_get_y_pixels_per_meter(png_ptr, info_ptr); @@ -119,11 +120,13 @@ int PNGCodec::readImage (std::istream* stream, Image& image, const std::string& * (not useful if you are using png_set_packing). */ // png_set_packswap(png_ptr); + png_get_tRNS(png_ptr, info_ptr, NULL, &num_trans, NULL); + /* Expand paletted colors into true RGB triplets */ if (color_type == PNG_COLOR_TYPE_PALETTE) { png_set_palette_to_rgb(png_ptr); image.bps = 8; - if (info_ptr->num_trans) + if (num_trans) image.spp = 4; else image.spp = 3; @@ -196,11 +199,11 @@ int PNGCodec::readImage (std::istream* stream, Image& image, const std::string& for (int pass = 0; pass < number_passes; ++pass) for (unsigned int y = 0; y < height; ++y) { row_pointers[0] = image.getRawData() + y * stride; - png_read_rows(png_ptr, row_pointers, png_bytepp_NULL, 1); + png_read_rows(png_ptr, row_pointers, NULL, 1); } /* clean up after the read, and free any memory allocated - REQUIRED */ - png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL); + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); /* that's it */ return true; @@ -224,7 +227,7 @@ bool PNGCodec::writeImage (std::ostream* stream, Image& image, int quality, /* Allocate/initialize the memory for image information. REQUIRED. */ info_ptr = png_create_info_struct(png_ptr); if (info_ptr == NULL) { - png_destroy_write_struct(&png_ptr, png_infopp_NULL); + png_destroy_write_struct(&png_ptr, NULL); return false; } @@ -244,8 +247,10 @@ bool PNGCodec::writeImage (std::ostream* stream, Image& image, int quality, else if (quality > Z_BEST_COMPRESSION) quality = Z_BEST_COMPRESSION; png_set_compression_level(png_ptr, quality); + /* Need? png_info_init (info_ptr); - + */ + /* Set up our STL stream output control */ png_set_write_fn (png_ptr, stream, &stdstream_write_data, &stdstream_flush_data); debian/patches/abs-int64_t.patch0000664000000000000000000000341612253646253013706 0ustar Description: Disable dead code that is causing compilation errors. Author: Jakub Wilk Bug-Debian: http://bugs.debian.org/583281 Last-Update: 2011-02-02 --- diff --git a/lib/ImageIterator2.hh b/lib/ImageIterator2.hh index 9e9a8bc279da1a538db7759895b648b00e7d7e5e..e88dd7dc584745ae3b3680210cb62bae7f2c7e0d 100644 --- a/lib/ImageIterator2.hh +++ b/lib/ImageIterator2.hh @@ -42,12 +42,14 @@ public: return a; } +#if 0 accu& abs() { v[0] = std::abs(v[0]); v[1] = std::abs(v[1]); v[2] = std::abs(v[2]); return *this; } +#endif void saturate () { v[0] = std::min (std::max (v[0], (vtype)0), (vtype)0xff); @@ -194,6 +196,7 @@ public: return a; } +#if 0 accu& abs() { v[0] = std::abs(v[0]); v[1] = std::abs(v[1]); @@ -201,6 +204,7 @@ public: v[3] = std::abs(v[3]); return *this; } +#endif void saturate () { v[0] = std::min (std::max (v[0], (vtype)0), (vtype)0xff); @@ -357,12 +361,14 @@ public: return a; } +#if 0 accu& abs() { v[0] = std::abs(v[0]); v[1] = std::abs(v[1]); v[2] = std::abs(v[2]); return *this; } +#endif void saturate () { v[0] = std::min (std::max (v[0], (vtype)0), (vtype)0xffff); @@ -509,10 +515,12 @@ public: return a; } +#if 0 accu& abs() { v[0] = std::abs(v[0]); return *this; } +#endif void saturate () { v[0] = std::min (std::max (v[0], (vtype)0), (vtype)0xff); @@ -638,10 +646,12 @@ public: return a; } +#if 0 accu& abs() { v[0] = std::abs(v[0]); return *this; } +#endif void saturate () { v[0] = std::min (std::max (v[0], (vtype)0), (vtype)0xffff); debian/patches/verbose_build.patch0000664000000000000000000000627712253646253014510 0ustar Description: Enforce simple verbose build for blhc The Debian build log analyzer gets confused by the extra output belonging to the quiet build. Removing them and enforcing verbose builds removes these false positives and increases the effectiveness of blhc Author: Sven Eckelmann Forwarded: not-needed --- diff --git a/build/bottom.make b/build/bottom.make index a3d549413dbc22dc30ef69455fb7806731985d4e..4c3968bb07b7b56545659478280d286a8321707b 100644 --- a/build/bottom.make +++ b/build/bottom.make @@ -23,7 +23,7 @@ endif # rules -Q = @ +Q = ifneq ($(X_BUILD_IMPLICIT),0) ifneq ($(X_NO_INSTALL),1) @@ -42,45 +42,36 @@ endif $(X_MODULE): $($(X_MODULE)_BINARY) $($(X_MODULE)_OUTPUT)/%.o: $(X_MODULE)/%.c - @echo ' C $@' $(Q)$(COMPILE.c) $($(dir $@)CFLAGS) -MMD -MP -MF '$(patsubst %.o,%.d,$@)' -o '$@' '$<' $($(X_MODULE)_OUTPUT)/%.o: $(X_MODULE)/%.m - @echo ' ObjC $@' $(Q)$(COMPILE.c) $($(dir $@)CFLAGS) -MMD -MP -MF '$(patsubst %.o,%.d,$@)' -o '$@' '$<' $($(X_MODULE)_OUTPUT)/%.o: $($(X_MODULE)_OUTPUT)/%.cc - @echo ' C++ $@' $(Q)$(COMPILE.cc) $($(dir $@)CXXFLAGS) -MMD -MP -MF '$(patsubst %.o,%.d,$@)' -o '$@' '$<' $($(X_MODULE)_OUTPUT)/%.o: $(X_MODULE)/%.cc - @echo ' C++ $@' $(Q)$(COMPILE.cc) $($(dir $@)CXXFLAGS) -MMD -MP -MF '$(patsubst %.o,%.d,$@)' -o '$@' '$<' $($(X_MODULE)_OUTPUT)/%.o: $(X_MODULE)/%.mm - @echo ' ObjC++ $@' $(Q)$(COMPILE.cc) $($(dir $@)CXXFLAGS) -MMD -MP -MF '$(patsubst %.o,%.d,$@)' -o '$@' '$<' # only implicit rules if one binary per module ... ifeq ($(words $(BINARY)), 1) $($(X_MODULE)_OUTPUT)/$(BINARY)$(X_LIBEXT): $($(X_MODULE)_OBJS) - @echo ' LINK LIB $@' $(Q)$(LD) -r -o '$@' $^ # # no AR anymore due to static initilizers # $(Q)$(AR) r '$@' $^ 2> /dev/null # $(Q)$(RANLIB) '$@' $($(X_MODULE)_OUTPUT)/$(BINARY)$(X_DYNEXT): $($(X_MODULE)_OBJS) - @echo ' LINK DYN $@' $(Q)$(CXX) $(CXXFLAGS) $(CPPFLAGS) $($(dir $@)CXXFLAGS) $(TARGET_ARCH) $(X_DYNFLAGS) -o '$@' $^ $(LDFLAGS) $($(dir $@)LDFLAGS) $($(X_MODULE)_OUTPUT)/$(BINARY)$(X_EXEEXT): $($(X_MODULE)_OBJS) - @echo ' LINK EXEC $@' $(Q)$(CXX) $(CXXFLAGS) $(CPPFLAGS) $($(dir $@)CXXFLAGS) $(TARGET_ARCH) $(X_EXEFLAGS) -o '$@' $^ $(LDFLAGS) $($(dir $@)LDFLAGS) endif $($(X_MODULE)_OUTPUT)/%: $($(X_MODULE)_OUTPUT)/%.o $(DEPS) - @echo ' LINK EXEC $@' $(Q)$(CXX) $(CXXFLAGS) $(CPPFLAGS) $($(dir $@)CXXFLAGS) $(TARGET_ARCH) $(X_EXEFLAGS) -o '$@' $^ $(LDFLAGS) $($(dir $@)LDFLAGS) diff --git a/build/kde.make b/build/kde.make index cf7ef8d5aef4d18144835f9cccb9afc3363816c9..efb0d8ff20a2b8d764aa311bab890c8ad302f97b 100644 --- a/build/kde.make +++ b/build/kde.make @@ -5,6 +5,5 @@ MOCS := $(filter-out $(NOT_MOCS), $(notdir $(wildcard $(X_MODULE)/*.hh))) SRCS := $(SRCS) $(addsuffix .moc.cc, $(basename $(MOCS))) $($(X_MODULE)_OUTPUT)/%.moc.cc: $(X_MODULE)/%.hh - @echo ' MOC $@' $(Q)moc $< > $@ diff --git a/build/top.make b/build/top.make index da004550a4acabb6faf4c1d87fe9193547f1f203..5a3f9fe7f458528b488d422c897cadb5ca2a26b3 100644 --- a/build/top.make +++ b/build/top.make @@ -42,7 +42,6 @@ ifndef X_ALREADYLOADED X_ALREADYLOADED = 1 .PHONY: clean clean:: - @echo "CLEANING $(X_OUTARCH)" $(Q)rm -rf $(X_OUTARCH) .SUFFIXES: debian/compat0000664000000000000000000000000212253646253010376 0ustar 9 debian/clean0000664000000000000000000000010212253646253010176 0ustar debian/manpages/*.[0-9] config.* conftest.* objdir/api/python*.*/ debian/edisplay.install0000664000000000000000000000002112253646253012373 0ustar usr/bin/edisplay debian/libexactimage-perl.examples0000664000000000000000000000001612253646253014473 0ustar examples/*.pl debian/exactimage.docs0000664000000000000000000000000512253646253012154 0ustar TODO