Tightened icon and cursor file detection heuristics.
authorDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Wed, 29 Dec 2010 12:31:37 +0000 (12:31 +0000)
committerDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Wed, 29 Dec 2010 12:31:37 +0000 (12:31 +0000)
commitb4c470164c9e273222715eed7edb0d1334efc5f2
treeecb833b0820b2a08ecbd40039ef28c6822707996
parentf74686cba0ebb5700d64a062d897296f25741cb9
Tightened icon and cursor file detection heuristics.

When loading a TGA file that has an image type of uncompressed true colour it would be falsely detected as a cursor file and as an icon file if type is of uncompressed colour mapped. Lower the chance of this happening by also checking the remaining member of an ICO and CUR header which represents the number of images in the file. This member has to be non-zero (checked against all found ICO and CUR files in an XP installation).

See also #12702.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66491 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/common/imagbmp.cpp