Minor wxPNGHandler cleanup.
Use int instead of png_uint_16 everywhere regarding number of palette entries, similar to how libpng exposes it (internally it uses png_uint_16). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
1de255d613
commit
50fa616c35
@ -650,9 +650,9 @@ error:
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
static int PaletteFind(const png_color& clr,
|
static int PaletteFind(const png_color& clr,
|
||||||
const png_color *pal, png_uint_16 palCount)
|
const png_color *pal, int palCount)
|
||||||
{
|
{
|
||||||
for (png_uint_16 i = 0; i < palCount; i++)
|
for (int i = 0; i < palCount; ++i)
|
||||||
{
|
{
|
||||||
if ( (clr.red == pal[i].red)
|
if ( (clr.red == pal[i].red)
|
||||||
&& (clr.green == pal[i].green)
|
&& (clr.green == pal[i].green)
|
||||||
@ -848,8 +848,7 @@ bool wxPNGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbos
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
png_uint_16 i;
|
for (int i = 0; i < palCount; ++i)
|
||||||
for (i = 0; i < palCount; ++i)
|
|
||||||
{
|
{
|
||||||
pal.GetRGB(i, &palette[i].red, &palette[i].green, &palette[i].blue);
|
pal.GetRGB(i, &palette[i].red, &palette[i].green, &palette[i].blue);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user