2
I have a JPEG (or PNG) image file and I want to create a PDF that contains this image without any quality loss. Just a one-page PDF document with that image. Is there an easy solution for this?
I know that pdflatex
can embed JPEG or PNG images directly into the document but I'd like to avoid creating a .tex
file, although this solution seems to be working: How to convert a png into pdf using LaTeX?.
As far is I know convert
always reencodes the image, so that is not the answer I'm looking for.
I'm not sure lossless is possible for an arbitrarily large image. – wogsland – 2017-03-20T22:09:00.717
@wogsland, i think the question is not about using lossless encoding, but about avoiding reencoding already encoded image. – Alexey – 2017-03-20T22:15:14.637
1
I can't personally vouch for how well it works, put apparently http://stackoverflow.com/a/16325916/6047952 refers to a program called
– infixed – 2017-03-20T22:28:19.157img2pdf
that wraps a jpg into a pdf without re-encodingMy understanding is that the PDF is more of a wrapper for the image than a re-encoding or conversion. I'm not familiar with whether the PDF spec defines limitations on embedded image characteristics (requiring re-encoding for compliance), but I believe any optimization is a "feature" of whatever is creating the PDF. – fixer1234 – 2017-03-20T22:30:32.610