[poppler] [PATCH] JPEG support for pdftoppm
Albert Astals Cid
aacid at kde.org
Tue Oct 6 15:07:34 PDT 2009
A Dijous, 1 d'octubre de 2009, Stefan Thomas va escriure:
> Same thing, this time with a common code path for PNG and JPEG
> (ImgWriter class, SplashBitmap::writeImgFile) and libjpeg error handling
> enabled.
>
> Not sure about the img_bytep type. Don't know where that belongs or
> whether it fits in all situations. Then again, if it doesn't fit then
> writeImgFile (formerly writePNGFile) probably wouldn't have worked anyway.
The patch is mostly ok, this is only nitpicking but if you fix it i'll be
happier :-)
Remove the img_bytep and img_byte typedefs, if it's a unsigned char * i prefer
to see unsigned char * than img_bytep
You don't need the casts in
writer = (ImgWriter*)new PNGWriter();
writer = (ImgWriter*)new JpegWriter();
#include "goo/ImgWriter.h" in SplashBitmap.h seems not needed
I'd prefer SplashImageType to be something like SplashImageFileFormat
I think you don't need
+#include "goo/JpegWriter.h"
+#include "goo/PNGWriter.h"
nor
+ ImgWriter *writer;
in pdftoppm.cc
And the addition of the feature to pdftoppm.1 is missing
Can you work in this minor changes?
Good work with the patch :-)
> Cheers,
>
> Stefan
>
> PS: Would it be better if I submitted patches through
> bugs.freedesktop.org instead?
No, the mailing list is ok
Albert
More information about the poppler
mailing list