license change from GPL to LGPL

This commit is contained in:
josch 2014-03-30 08:10:12 +02:00
parent 632cd1d712
commit 818db1902f
3 changed files with 25 additions and 12 deletions

View file

@ -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 better (in terms of quality/filesize ratio) than existing tools in case the
input image is a JPEG or JPEG2000 file. input image is a JPEG or JPEG2000 file.
For the record, the imagemagick command to lossless convert any image to For example, imagemagick will re-encode the input JPEG image and thus change
PDF using zip-encoding, is: 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 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 files a few times bigger than the input JPEG or JPEG2000 file and can also not

View file

@ -6,7 +6,7 @@ setup (
author = "Johannes 'josch' Schauer", author = "Johannes 'josch' Schauer",
description = "Convert images to PDF via direct JPEG inclusion.", description = "Convert images to PDF via direct JPEG inclusion.",
long_description = open('README.md').read(), long_description = open('README.md').read(),
license = "GPL", license = "LGPL",
keywords = "jpeg pdf converter", keywords = "jpeg pdf converter",
classifiers = [ classifiers = [
'Development Status :: 4 - Beta', 'Development Status :: 4 - Beta',
@ -16,7 +16,7 @@ setup (
'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: Implementation :: CPython', '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', 'Programming Language :: Python',
'Natural Language :: English', 'Natural Language :: English',
'Operating System :: OS Independent'], 'Operating System :: OS Independent'],

View file

@ -1,17 +1,19 @@
# Copyright (C) 2012-2013 Johannes 'josch' Schauer <j.schauer at email.de> # Copyright (C) 2012-2014 Johannes 'josch' Schauer <j.schauer at email.de>
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or
# it under the terms of the GNU General Public License as published by # modify it under the terms of the GNU Lesser General Public
# the Free Software Foundation, either version 3 of the License, or # License as published by the Free Software Foundation, either
# (at your option) any later version. # version 3 of the License, or (at your option) any later
# version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public
# along with this program. If not, see <http://www.gnu.org/licenses/>. # License along with this program. If not, see
# <http://www.gnu.org/licenses/>.
import sys import sys
import zlib import zlib