lodepng 2020-04-16 (b51302e1)

Code extracted from:

    https://gitlab.kitware.com/third-party/lodepng.git

at commit b51302e11851e825089172285f920a089f12e318 (for/vtk-m).
This commit is contained in:
LodePNG Upstream 2020-04-16 12:01:22 -04:00 committed by nadavi
parent 43e0185b2d
commit 957568e368
2 changed files with 9 additions and 9 deletions

@ -3325,7 +3325,7 @@ void lodepng_compute_color_stats(LodePNGColorStats* stats,
if(!numcolors_done) {
for(i = 0; i < stats->numcolors; i++) {
const unsigned char* color = &stats->palette[i * 4];
color_tree_add(&tree, color[0], color[1], color[2], color[3], i);
color_tree_add(&tree, color[0], color[1], color[2], color[3], (unsigned int)i);
}
}
@ -4243,7 +4243,7 @@ static unsigned readChunk_iCCP(LodePNGInfo* info, const LodePNGDecompressSetting
&data[string2_begin],
length, zlibsettings);
if(!error) {
info->iccp_profile_size = decoded.size;
info->iccp_profile_size = (unsigned int)decoded.size;
info->iccp_profile = (unsigned char*)lodepng_malloc(decoded.size);
if(info->iccp_profile) {
memcpy(info->iccp_profile, decoded.data, decoded.size);

@ -28,13 +28,6 @@ freely, subject to the following restrictions:
#include <string.h> /*for size_t*/
namespace vtkm
{
namespace png
{
extern const char* LODEPNG_VERSION_STRING;
/*
The following #defines are used to create code sections. They can be disabled
to disable code sections, which can give faster compile time and smaller binary.
@ -99,6 +92,13 @@ source files with custom allocators.*/
#include <string>
#endif /*LODEPNG_COMPILE_CPP*/
namespace vtkm
{
namespace png
{
extern const char* LODEPNG_VERSION_STRING;
#ifdef LODEPNG_COMPILE_PNG
/*The PNG color types (also used for raw).*/
typedef enum LodePNGColorType {