mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
Use logging framework [CI SKIP]
This commit is contained in:
parent
104e7bd9c2
commit
eb36a07ab7
@ -28,12 +28,12 @@ vtkm::UInt32 EncodePNG(std::vector<unsigned char> const& image,
|
||||
std::vector<unsigned char>& output_png)
|
||||
{
|
||||
// The default is 8 bit RGBA; does anyone care to have more options?
|
||||
// We can certainly add them in a backwards-compatible way if need be.
|
||||
vtkm::UInt32 error = vtkm::png::lodepng::encode(output_png, image, width, height);
|
||||
if (error)
|
||||
{
|
||||
// TODO: Use logging framework instead:
|
||||
std::cerr << "PNG Encoder error number " << error << ": " << png::lodepng_error_text(error)
|
||||
<< "\n";
|
||||
VTKM_LOG_S(vtkm::cont::LogLevel::Error,
|
||||
"LodePNG Encoder error number " << error << ": " << png::lodepng_error_text(error));
|
||||
}
|
||||
return error;
|
||||
}
|
||||
@ -54,7 +54,8 @@ vtkm::UInt32 SavePNG(std::string const& filename,
|
||||
|
||||
if (!ends_with(filename, ".png"))
|
||||
{
|
||||
std::cerr << "PNG filename must end with .png\n";
|
||||
VTKM_LOG_S(vtkm::cont::LogLevel::Error,
|
||||
"File " << filename << " does not end with .png; this is required.");
|
||||
}
|
||||
|
||||
std::vector<unsigned char> output_png;
|
||||
|
@ -20,7 +20,6 @@ namespace vtkm
|
||||
namespace rendering
|
||||
{
|
||||
|
||||
//
|
||||
VTKM_RENDERING_EXPORT
|
||||
vtkm::UInt32 EncodePNG(std::vector<unsigned char> const& image,
|
||||
unsigned long width,
|
||||
|
Loading…
Reference in New Issue
Block a user