2020-04-17 10:22:30 +00:00
|
|
|
//============================================================================
|
|
|
|
// Copyright (c) Kitware, Inc.
|
|
|
|
// All rights reserved.
|
|
|
|
// See LICENSE.txt for details.
|
|
|
|
//
|
|
|
|
// This software is distributed WITHOUT ANY WARRANTY; without even
|
|
|
|
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
// PURPOSE. See the above copyright notice for more information.
|
|
|
|
//============================================================================
|
2020-04-28 11:13:27 +00:00
|
|
|
#ifndef vtk_m_io_EncodePNG_h
|
|
|
|
#define vtk_m_io_EncodePNG_h
|
2020-04-17 10:22:30 +00:00
|
|
|
|
|
|
|
#include <vtkm/Types.h>
|
2020-04-28 13:12:11 +00:00
|
|
|
#include <vtkm/io/vtkm_io_export.h>
|
2020-04-17 10:22:30 +00:00
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace vtkm
|
|
|
|
{
|
2020-04-28 11:13:27 +00:00
|
|
|
namespace io
|
2020-04-17 10:22:30 +00:00
|
|
|
{
|
|
|
|
|
2020-04-28 13:12:11 +00:00
|
|
|
VTKM_IO_EXPORT
|
2020-04-17 10:22:30 +00:00
|
|
|
vtkm::UInt32 EncodePNG(std::vector<unsigned char> const& image,
|
|
|
|
unsigned long width,
|
|
|
|
unsigned long height,
|
|
|
|
unsigned char* out_png,
|
|
|
|
std::size_t out_size);
|
|
|
|
|
2020-04-28 13:12:11 +00:00
|
|
|
VTKM_IO_EXPORT
|
2020-04-17 11:32:01 +00:00
|
|
|
vtkm::UInt32 SavePNG(std::string const& filename,
|
2020-04-17 10:22:30 +00:00
|
|
|
std::vector<unsigned char> const& image,
|
|
|
|
unsigned long width,
|
|
|
|
unsigned long height);
|
|
|
|
}
|
2020-04-28 11:13:27 +00:00
|
|
|
} // vtkm::io
|
2020-04-17 10:22:30 +00:00
|
|
|
|
2020-04-28 11:13:27 +00:00
|
|
|
#endif //vtk_m_io_EncodePNG_h
|