From 818db1902f0c9a0195b3c0e6bfd7c3dac5c7a7cb Mon Sep 17 00:00:00 2001 From: josch Date: Sun, 30 Mar 2014 08:10:12 +0200 Subject: [PATCH] license change from GPL to LGPL --- README.md | 17 ++++++++++++++--- setup.py | 4 ++-- src/img2pdf.py | 16 +++++++++------- 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index f835c83..6061d8e 100644 --- a/README.md +++ b/README.md @@ -26,10 +26,21 @@ will be able to lossless wrap any image into a PDF container while performing better (in terms of quality/filesize ratio) than existing tools in case the input image is a JPEG or JPEG2000 file. -For the record, the imagemagick command to lossless convert any image to -PDF using zip-encoding, is: +For example, imagemagick will re-encode the input JPEG image and thus change +its content: - convert input.jpg -compress Zip output.pdf + $ convert img.jpg img.pdf + $ pdfimages img.pdf img.extr # not using -j to be extra sure there is no recompression + $ compare -metric AE img.jpg img.extr-000.ppm null: + 1.6301e+06 + +If one wants to do a lossless conversion from any format to PDF with +imagemagick then one has to use zip-encoding: + + $ convert input.jpg -compress Zip output.pdf + $ pdfimages img.pdf img.extr # not using -j to be extra sure there is no recompression + $ compare -metric AE img.jpg img.extr-000.ppm null: + 0 The downside is, that using imagemagick like this will make the resulting PDF files a few times bigger than the input JPEG or JPEG2000 file and can also not diff --git a/setup.py b/setup.py index 55bbcad..2b490dc 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup ( author = "Johannes 'josch' Schauer", description = "Convert images to PDF via direct JPEG inclusion.", long_description = open('README.md').read(), - license = "GPL", + license = "LGPL", keywords = "jpeg pdf converter", classifiers = [ 'Development Status :: 4 - Beta', @@ -16,7 +16,7 @@ setup ( 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: Implementation :: CPython', - 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', + 'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)', 'Programming Language :: Python', 'Natural Language :: English', 'Operating System :: OS Independent'], diff --git a/src/img2pdf.py b/src/img2pdf.py index 65591dc..9753a7b 100755 --- a/src/img2pdf.py +++ b/src/img2pdf.py @@ -1,17 +1,19 @@ -# Copyright (C) 2012-2013 Johannes 'josch' Schauer +# Copyright (C) 2012-2014 Johannes 'josch' Schauer # -# 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 3 of the License, or -# (at your option) any later version. +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation, either +# version 3 of the License, or (at your option) any later +# version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# You should have received a copy of the GNU General Public +# License along with this program. If not, see +# . import sys import zlib