[wx-dev] Suggested (minor) improvement for Image PNM import - imagpnm.cpp

Vadim Zeitlin vadim at wxwidgets.org
Sun Jun 3 15:08:17 PDT 2007


On Sun, 03 Jun 2007 14:11:37 -0700 (PDT) Ray Johnston <ray.johnston at artifex.com> wrote:

RJ> The PNM format import code collects the 'maxval' value from the
RJ> input stream, but the current code (2.8.4) never uses it, causing
RJ> the images to be much darker than the intended.
RJ> 
RJ> The attached patch fixes the problem. I discovered this with images
RJ> created with the Ghostscript 'pkm' and 'pkmraw' devices and tested
RJ> it with those. I've attached a sample 'tiger.pkm' (gzipped) that
RJ> illustrates this deficiency and opens correctly with the patch.

 Thanks for the patch and the test case, applied to both branches (HEAD and
2.8). Just one small request for the future patches: could you please use
unified diff format (just a question of habit) and avoid hard TABs in wx
sources (as they have to be eradicated manually before committing)?

 We'd definitely appreciate more patches to wx image format support files
if you find any other problems -- thanks in advance!

VZ





More information about the wx-dev mailing list