KNOWNBUG 6.0 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22

Known bugs and suggested enhancements in libpng-1.0.1

1. March 13, 1998 -- BUG -- pngtrans.c:

   row_info->channels should be updated --
   row_info->color_type should be updated --

   STATUS: I think this is all fixed in libpng-1.0.1a but needs
   to be tested.

2. March 14, 1998 -- ENHANCEMENT -- Glenn

   We should add the G>GA, G>GX, G>AG, and G>XG transformations
   in png_do_read_filler()

   STATUS:  Implemented in libpng-1.0.1a

3. March 14, 1998 -- BUG? -- Greg Roelofs

   pngrtran.c:  if-test for channels/FILLER may be incorrect

23 24
   STATUS: Under investigation.  Appears to be working correctly
   in libpng-1.0.1c.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44

4. March 15, 1998 -- BUG -- Kevin Bracey

   pngwtran.c:
      line 306: loop should count to row_info->width, not to
             row_info->width*row_info->channnels

   STATUS: Fixed in libpng-1.0.1a

5. March 15, 1998 -- OPTIMIZATION -- Kevin Bracey

   Loops need to be optimized everywhere

   a. Make them count down instead of up -- Kevin Bracey
   
      Optimizing compilers don't need this, and making
      the change would be error prone -- Tom Lane, Glenn R-P

      Question whether i-- or --i is better.

45 46 47
      STATUS: Under investigation.  About 150 loops turned around
      in libpng-1.0.1d, for testing.  Object files and executables
      are about 20k smaller in SGI and gcc-compiled codes.  
48 49 50 51 52 53 54 55 56 57

   b. Remove products and structure members from loop tests -- Glenn R-P

      Can be accomplished without messing with loop guts.  This
      was shown to be effective on optimized SGI compiler:

              replace
                  png_uint_32 i;
                  for(i=0; i < s->a*s->b; i++)
              with
58
                  png_uint_32 i, istop;
59 60 61 62
                  istop = s->a*s->b;
                  for(i=0; i<istop; i++)

      STATUS: Mostly done in libpng-1.0.1a, done for all important loops.
63
              More done in libpng-1.0.1b.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98

   c. Replace abs() with intrinsic ternary operations in Paeth
      filtering -- Glenn R-P

      STATUS: Done in libpng-1.0.1a
      (can be restored to original behavior with #define PNG_USE_ABS)

   d. In pngwutil.c, make separate simple loops to use when filter 
      heuristic sums aren't needed. -- Glenn R-P

      STATUS: Done in libpng-1.0.1a

6. April 6, 1998 -- BUG -- bug in pngset.c (rowbytes too large) -- Bob Dellaca

   pngset.c has a bug, introduced in version 0.99c, that sets rowbytes
     too large when writing an image with bit_depth < 8

   STATUS: Fixed in libpng-1.0.1a
              
7. April 10, 1998 -- BUG -- pngwutil weighted filtering bugs -- Glenn R-P

   pngwutil.c has some bugs in the experimental weighted filter
   algorithm (PNG_FILTER_XXX should be PNG_FILTER_VALUE_XXX in
   several places)

   STATUS: Andreas concurs.  Fixed in libpng-1.0.1a

8. April 10, 1998 -- ENHANCEMENT -- run-time selection of malloc function
   -- Bob Dellaca

   pngmem.c currently provides a compile-time option to replace
   png_malloc() and png_free().  It's been requested that these
   be made possible at run time, via calls to new png_set_malloc_fn()
   and png_set_free_fn() functions.

99
   STATUS: Under consideration
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117

9. April 11, 1998 -- BUG -- incorrect truncation of tRNS data in
   illegal PNG file where tRNS precedes PLTE -- Larry Reeve

   There is a misplaced pngrutil code block that truncates tRNS if it has
   more than num_palette entries -- test was done before num_palette was
   defined.  Although the PNG file is illegal, it shouldn't crash apps.
   There is a simple fix; just moving the test to the point after
   num_palette has been defined.

   STATUS: Fixed in libpng-1.0.1a

10. April 16, 1998 -- BUG -- incorrect operation of png_convert_to_rfc1123
   with 31st day of the month -- Steve Eddins

   The "ptime->date % 31" is wrong, should be "ptime->date % 32".

   STATUS: Fixed in libpng-1.0.1a
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137

11. April 21, 1998 -- ENHANCEMENT -- relocation of composite macros

   png_composite() and png_composite_16() relocated to png.h

   STATUS: Done in libpng-1.0.1b

12. April 22, 1998 -- ENHANCEMENT -- makefile.sco

   Mike Hopkirk contributed a makefile for SCO osr5 and sco UW7

   STATUS: Added to libpng-1.0.1b distribution

13: April 30, 1998 -- ENHANCEMENT -- warnings

   When people define out some of the read transformations and then
   try to use them, the request is silently ignored.  It was suggested
   that a warning be issued in such cases.

   STATUS: Done in libpng-1.0.1b
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160

14. May 2, 1998 -- BUG -- incorrect mask for filler bytes

   In pngrtran.c, png_do_filler(), the masks for hi_filler and low_filler
   should be 0xff instead of 0xf

   STATUS: Fixed in libpng-1.0.1c

15. May 3, 1998 -- BUG -- buffer overflow in png_do_read_filler()

   In pngrutil.c, max_pixel_depth needs to be set to 32 when using
   png_do_read_filler with palette images.

   STATUS: Fixed in libpng-1.0.1c (see also items 1 and 3 above).

16. May 3, 1998 -- BUG -- type definitions wrong on error functions -- Tom Lane

   In png_create_xxx_struct(), the error functions should have typedef
   png_voidp instead of (void *).  Needs to be corrected in the functions,
   the prototypes in png.h, the example.c file, and libpng.txt and libpng.3

   
   STATUS: Fixed in libpng-1.0.1c
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186

17. May 10, 1998 -- DOCUMENTATION -- Greg

   There are a number of incorrect usages of "which" and "it's" in the
   comments.

   STATUS:

   Fixed in libpng-1.0.1c

18. May 20, 1998 -- BUG -- illegal use of side effects -- Magnus Holmgren

   In libpng-1.0.1b several illegal uses of side effects were
   introduced while tuning loops in pngrutil.c; also one in pngtrans.c.

   STATUS:

   Fixed in libpng-1.0.1d

19. May 20, 1998 -- ENHANCEMENT --  script for making DLL -- Bob Dellaca

   Bob Dellaca contributed script for making PNG DLL on Borland C++ 4.5

   STATUS:

   Added to distribution in libpng-1.0.1d 
187 188 189 190 191 192 193 194 195 196

20. May 26, 1998 -- BUG -- png_do_gamma is skipped -- Magnus Holmgren

   When a background color is defined for a truecolor image, but no
   transparent color is defined, gamma correction is not done.
   The test in pngrtran should include " && !png_ptr->trans_values"

   STATUS:

   Fixed in libpng-1.0.1e