Show
Ignore:
Timestamp:
01/11/10 15:28:33 (4 years ago)
Author:
robert
Message:

From Laurens Voerman,"the current ReaderWriterJP2 has all the code for writing jp2 files (jpeg 2000), but the writing fails on my windows machine (jasper-1.900.1) because the ID for the "jp2" extention is requested before the jas_init() call. (bug introduced in svn 7645 - 10 dec 2007)"

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/jp2/ReaderWriterJP2.cpp

    r8578 r10939  
    180180            // little dance here to get around warnings created by jas_image_strtofmt use of char* rather than const char* 
    181181            // as a parameted and modern compilers deprecating "jp2" string being treated as char*. 
     182            jas_init();//jas_image_strtofmt() bound to return -1 if jas_init has not been called. 
    182183            char* jp2 = strdup("jp2"); 
    183184            _fmt_jp2 = jas_image_strtofmt(jp2); 
    184185            free(jp2); 
     186            jas_image_clearfmts(); 
    185187        } 
    186188