The JPEG compression level of ppftoppm/pdftocairo when using the option -jpeg is pretty severe. Please, add an option to set the jpg compression level, just as there is one for -tiff. Tried using pdftoppm version 0.18.2 poppler @0.18.2 (graphics) (Macports)
*** Bug 46659 has been marked as a duplicate of this bug. ***
i'm using pdftoppm version 0.22.0 are there any news related to the jpg output quality?
Hi! I am using pdftoppm version 0.55.0: pdftoppm version 0.55.0 Copyright 2005-2017 The Poppler Developers - http://poppler.freedesktop.org Copyright 1996-2011 Glyph & Cog, LLC Are there any updates related to this?
Created attachment 132698 [details] [review] pdftocairo: add -jpegopt option This patch adds support to pdftocairo for setting jpeg compression parameters. I've followed the same pattern as for the -printopt option to allow easily adding more compression parameters if required. Currently only the "quality" and "progressive" parameters are supported by this patch. If this looks good and can add the same support to pdftoppm.
Created attachment 132701 [details] [review] pdftocairo: add -jpegopt option fix typo
Created attachment 132702 [details] [review] pdftoppm: add -jpegopt option Add jpeg compression control to pdftoppm
Not enterily happy about saving the jpeg data in the SplashBitmap, maybe we can pass them in the writeImgFile function as optional parameters? It's not awesome etiher but at least the uglyness is more concentrated in just one function :D What do you think?
I don't like to keep adding parameters to a function where only a subset of the parameters are used for each call. We already have the tiff compression parameter and more parameters may be added in future. Alternatively how about we use a struct for all optional parameters. eg struct WriteImgParams { int jpegQuality = -1; GBool jpegProgressive = gFalse; GooString tiffCompression; }; SplashError writeImgFile(SplashImageFileFormat format, char *fileName, int hDPI, int vDPI, const WriteImgParams& params);
(In reply to Adrian Johnson from comment #8) > I don't like to keep adding parameters to a function where only a subset of > the parameters are used for each call. We already have the tiff compression > parameter and more parameters may be added in future. > > Alternatively how about we use a struct for all optional parameters. eg > > struct WriteImgParams > { > int jpegQuality = -1; > GBool jpegProgressive = gFalse; > GooString tiffCompression; > }; > > SplashError writeImgFile(SplashImageFileFormat format, char *fileName, int > hDPI, int vDPI, const WriteImgParams& params); That works for me.
Created attachment 133544 [details] [review] pdftoppm: add -jpegopt option v2
this looks better, i don't see anything that would break. Maybe change the NULL to nullptr?
Changed NULL to nullptr and pushed.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.