mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-19 02:25:42 +00:00
Merge branch 'upstream-lodepng' into lodepng-in-lib
* upstream-lodepng: lodepng 2020-04-16 (b51302e1)
This commit is contained in:
commit
abf5692887
@ -3325,7 +3325,7 @@ void lodepng_compute_color_stats(LodePNGColorStats* stats,
|
|||||||
if(!numcolors_done) {
|
if(!numcolors_done) {
|
||||||
for(i = 0; i < stats->numcolors; i++) {
|
for(i = 0; i < stats->numcolors; i++) {
|
||||||
const unsigned char* color = &stats->palette[i * 4];
|
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],
|
&data[string2_begin],
|
||||||
length, zlibsettings);
|
length, zlibsettings);
|
||||||
if(!error) {
|
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);
|
info->iccp_profile = (unsigned char*)lodepng_malloc(decoded.size);
|
||||||
if(info->iccp_profile) {
|
if(info->iccp_profile) {
|
||||||
memcpy(info->iccp_profile, decoded.data, decoded.size);
|
memcpy(info->iccp_profile, decoded.data, decoded.size);
|
||||||
|
14
vtkm/thirdparty/lodepng/vtkmlodepng/lodepng.h
vendored
14
vtkm/thirdparty/lodepng/vtkmlodepng/lodepng.h
vendored
@ -28,13 +28,6 @@ freely, subject to the following restrictions:
|
|||||||
|
|
||||||
#include <string.h> /*for size_t*/
|
#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
|
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.
|
to disable code sections, which can give faster compile time and smaller binary.
|
||||||
@ -99,6 +92,13 @@ source files with custom allocators.*/
|
|||||||
#include <string>
|
#include <string>
|
||||||
#endif /*LODEPNG_COMPILE_CPP*/
|
#endif /*LODEPNG_COMPILE_CPP*/
|
||||||
|
|
||||||
|
namespace vtkm
|
||||||
|
{
|
||||||
|
namespace png
|
||||||
|
{
|
||||||
|
|
||||||
|
extern const char* LODEPNG_VERSION_STRING;
|
||||||
|
|
||||||
#ifdef LODEPNG_COMPILE_PNG
|
#ifdef LODEPNG_COMPILE_PNG
|
||||||
/*The PNG color types (also used for raw).*/
|
/*The PNG color types (also used for raw).*/
|
||||||
typedef enum LodePNGColorType {
|
typedef enum LodePNGColorType {
|
||||||
|
Loading…
Reference in New Issue
Block a user