This commit is contained in:
2026-06-14 19:09:18 +01:00
parent 14bd1a9271
commit 13fa90a0e9
3958 changed files with 999286 additions and 4 deletions
@@ -0,0 +1,51 @@
// -*- tab-width: 4; -*-
// vi: set sw=2 ts=4 expandtab:
// Copyright 2022 The Khronos Group Inc.
// SPDX-License-Identifier: Apache-2.0
/**
* @internal
* @~English
* @file
*
* @brief ImageOutput to PNG format files.
*
* @author Mark Callow
*/
#include "imageio.h"
#include <iterator>
#include <sstream>
#include <stdexcept>
#include "lodepng.h"
#include <KHR/khr_df.h>
#include "dfd.h"
class pngOutput final : public ImageOutput {
public:
pngOutput() : ImageOutput("png") {}
virtual ~pngOutput() { close(); }
virtual void close() override { }
virtual void open(const std::string& name, const ImageSpec& newspec,
OpenMode mode) override;
protected:
};
ImageOutput*
pngOutputCreate()
{
return new pngOutput;
}
const char* pngOutputExtensions[] = { "png", nullptr };
void
pngOutput::open(const std::string& /*name*/, const ImageSpec& /*newspec*/,
OpenMode /*mode*/)
{
}