Last Comment Bug 745202 - Libpng 1.5.10 check for invalid palette index is ignored.
: Libpng 1.5.10 check for invalid palette index is ignored.
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: ImageLib (show other bugs)
: Trunk
: All All
: -- enhancement (vote)
: mozilla17
Assigned To: Glenn Randers-Pehrson
:
: Milan Sreckovic [:milan]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-13 08:06 PDT by Glenn Randers-Pehrson
Modified: 2012-07-24 02:58 PDT (History)
4 users (show)
ryanvm: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
v00 Disable palette-index checking in the PNG decoder (1.49 KB, patch)
2012-04-13 08:18 PDT, Glenn Randers-Pehrson
joe: review+
Details | Diff | Splinter Review

Description Glenn Randers-Pehrson 2012-04-13 08:06:48 PDT
Libpng-1.5.10 adds a new function to check the palette-index for valid range.  Currently we simply display such pixels as black, which is harmless.  The libpng-1.5.0 feature only issues a warning, and we ignore warnings if PR_LOGGING is not defined.  For speed, we should avoid this new check which involves another pass over each row of pixels.  The embedded libpng will skip the check, but the system library does not.  Libpng-1.5.10 provides a "png_set_check_for_invalid_index()" function that can be used to avoid the check.
Comment 1 Glenn Randers-Pehrson 2012-04-13 08:18:37 PDT
Created attachment 614792 [details] [diff] [review]
v00 Disable palette-index checking in the PNG decoder

offers a small performance improvement when using a system libpng 1.5.10 and later.
Comment 2 Ryan VanderMeulen [:RyanVM] 2012-07-23 17:03:39 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/bd616252640b

Sorry for losing track of this one...
Comment 3 Ed Morley [:emorley] 2012-07-24 02:58:21 PDT
https://hg.mozilla.org/mozilla-central/rev/bd616252640b

Note You need to log in before you can comment on or make changes to this bug.