[poppler] [PATCH] JPEG support for pdftoppm

Stefan Thomas thomas at eload24.com
Wed Oct 7 15:15:32 PDT 2009


Thanks for the feedback. Revised patch is attached.

Albert Astals Cid wrote:
> 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
>
>   

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Add-the-jpeg-flag-to-pdftoppm-to-output-to-JPEG.patch
Url: http://lists.freedesktop.org/archives/poppler/attachments/20091008/bc8f9564/attachment.ksh 


More information about the poppler mailing list