26 #include <vsg/io/ReaderWriter.h>
27 #include <vsgXchange/Version.h>
30 #include <unordered_set>
36 class VSGXCHANGE_DECLSPEC
images :
public vsg::Inherit<vsg::CompositeReaderWriter, images>
43 class VSGXCHANGE_DECLSPEC
stbi :
public vsg::Inherit<vsg::ReaderWriter, stbi>
48 vsg::ref_ptr<vsg::Object> read(
const vsg::Path& filename, vsg::ref_ptr<const vsg::Options> options = {})
const override;
49 vsg::ref_ptr<vsg::Object> read(std::istream& fin, vsg::ref_ptr<const vsg::Options> options = {})
const override;
50 vsg::ref_ptr<vsg::Object> read(
const uint8_t* ptr,
size_t size, vsg::ref_ptr<const vsg::Options> options = {})
const override;
51 bool write(
const vsg::Object*
object,
const vsg::Path& filename, vsg::ref_ptr<const vsg::Options> = {})
const override;
52 bool write(
const vsg::Object*
object, std::ostream& stream, vsg::ref_ptr<const vsg::Options> = {})
const override;
54 bool getFeatures(Features& features)
const override;
57 static constexpr
const char* jpeg_quality =
"jpeg_quality";
59 bool readOptions(vsg::Options& options, vsg::CommandLine& arguments)
const override;
62 std::set<vsg::Path> _supportedExtensions;
66 class VSGXCHANGE_DECLSPEC
dds :
public vsg::Inherit<vsg::ReaderWriter, dds>
71 vsg::ref_ptr<vsg::Object> read(
const vsg::Path& filename, vsg::ref_ptr<const vsg::Options> options = {})
const override;
72 vsg::ref_ptr<vsg::Object> read(std::istream& fin, vsg::ref_ptr<const vsg::Options> options = {})
const override;
73 vsg::ref_ptr<vsg::Object> read(
const uint8_t* ptr,
size_t size, vsg::ref_ptr<const vsg::Options> options = {})
const override;
75 bool getFeatures(Features& features)
const override;
78 std::set<vsg::Path> _supportedExtensions;
82 class VSGXCHANGE_DECLSPEC
ktx :
public vsg::Inherit<vsg::ReaderWriter, ktx>
87 vsg::ref_ptr<vsg::Object> read(
const vsg::Path& filename, vsg::ref_ptr<const vsg::Options> options = {})
const override;
88 vsg::ref_ptr<vsg::Object> read(std::istream& fin, vsg::ref_ptr<const vsg::Options> options = {})
const override;
89 vsg::ref_ptr<vsg::Object> read(
const uint8_t* ptr,
size_t size, vsg::ref_ptr<const vsg::Options> options = {})
const override;
91 bool getFeatures(Features& features)
const override;
94 std::set<vsg::Path> _supportedExtensions;
98 class openexr :
public vsg::Inherit<vsg::ReaderWriter, openexr>
103 vsg::ref_ptr<vsg::Object> read(
const vsg::Path& filename, vsg::ref_ptr<const vsg::Options> options = {})
const override;
104 vsg::ref_ptr<vsg::Object> read(std::istream& fin, vsg::ref_ptr<const vsg::Options> options = {})
const override;
105 vsg::ref_ptr<vsg::Object> read(
const uint8_t* ptr,
size_t size, vsg::ref_ptr<const vsg::Options> options = {})
const override;
107 bool write(
const vsg::Object*
object,
const vsg::Path& filename, vsg::ref_ptr<const vsg::Options> = {})
const override;
108 bool write(
const vsg::Object*
object, std::ostream& fout, vsg::ref_ptr<const vsg::Options> = {})
const override;
110 bool getFeatures(Features& features)
const override;
113 std::set<vsg::Path> _supportedExtensions;
add dds support using local build of tinydds.
Definition: images.h:67
add ktx using using local build of libktx
Definition: images.h:83
optional .exr support using OpenEXR library
Definition: images.h:99
add png, jpeg and gif support using local build of stbi.
Definition: images.h:44