jbig2enc's pdf.py demo program did not properly retain an image's DPI
when creating a PDF; it was hardcoded to 600, regardless of the actual
resolution of the input image. This patch corrects that by intelligently
extracting the DPI from the file being converted.
ClosesHomebrew/homebrew#7913.
Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>