Added desctructor with jas_cleanup().
This commit is contained in:
@@ -176,7 +176,7 @@ class ReaderWriterJP2 : public osgDB::ReaderWriter
|
||||
{
|
||||
supportsExtension("jp2","Jpeg2000 image format");
|
||||
supportsExtension("jpc","Jpeg2000 image format");
|
||||
|
||||
|
||||
// little dance here to get around warnings created by jas_image_strtofmt use of char* rather than const char*
|
||||
// as a parameted and modern compilers deprecating "jp2" string being treated as char*.
|
||||
jas_init();//jas_image_strtofmt() bound to return -1 if jas_init has not been called.
|
||||
@@ -186,8 +186,13 @@ class ReaderWriterJP2 : public osgDB::ReaderWriter
|
||||
jas_image_clearfmts();
|
||||
}
|
||||
|
||||
~ReaderWriterJP2()
|
||||
{
|
||||
jas_cleanup();
|
||||
}
|
||||
|
||||
virtual const char* className() const { return "RGB Image Reader/Writer"; }
|
||||
|
||||
|
||||
virtual ReadResult readObject(const std::string& file, const osgDB::ReaderWriter::Options* options) const
|
||||
{
|
||||
return readImage(file,options);
|
||||
|
||||
Reference in New Issue
Block a user