forked from josch/img2pdf
license change from GPL to LGPL
This commit is contained in:
parent
632cd1d712
commit
818db1902f
3 changed files with 25 additions and 12 deletions
17
README.md
17
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
|
||||
|
|
4
setup.py
4
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'],
|
||||
|
|
|
@ -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
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
# You should have received a copy of the GNU General Public
|
||||
# License along with this program. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
import sys
|
||||
import zlib
|
||||
|
|
Loading…
Reference in a new issue