mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
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:
parent
43e0185b2d
commit
957568e368
@ -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);
|
||||
|
14
lodepng.h
14
lodepng.h
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user