On Tue, Mar 18, 2014 at 11:06:00PM +0100, Johannes Schauer wrote: > Description : Lossless conversion of JPEG, JPEG2000 and other raster > graphic formats to PDF > > [...] > > There seems to be no tool (correct me if I'm wrong) which can embed an > image into a pdf without either loosing information due to JPEG > re-encoding or blowing up the filesize through Flate/zlib encoding. It > would thus be a useful tool to have in Debian.
it is my impression that imagemagick's convert program can do exactly that (judging from converting differently compressed jpgs through `convert a.jpg a.pdf` and looking at the file sizes, and comparing an image with what comes out after roundtripping through convert and `pdfimages -j` -- were the dct not preserved, it could hardly not grow significantly and yet yield the exactly same image). you cite convert for comparison[1], but only use Zip compression as convert option. had i not used imagemagick for this purpose for quite some time, i'd suggest you re-evaluate with the latest version of convert. what behavior do you get when not using any convert options? (assuming my results are correct and imagemagick behaves well), having such a converter in a way it can be used directly from python is certainly nice (and would have been great for the workaround for [lp:168708]), but personally, i wouldn't spend too much time on it. best regards chrysn [1] https://github.com/josch/img2pdf/blob/master/README.md [lp:168708] https://bugs.launchpad.net/inkscape/+bug/168708 -- To use raw power is to make yourself infinitely vulnerable to greater powers. -- Bene Gesserit axiom
signature.asc
Description: Digital signature