Hi,<br>out of curiosity, I'm trying to build GDAL with Kakadu support for JP2K.<br><br>I have downloaded the Kakadu windows library but when I build GDAL this error occurs:<br><br>--------------------------------------------------------------------------------------------------------------------------
<br>D:\gdal\frmts&gt;cd jp2kak&nbsp;&nbsp; &amp;&amp; nmake /NOLOGO /f <a href="http://makefile.vc">makefile.vc</a>&nbsp;&nbsp; &amp;&amp; cd ..<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cl /nologo /MD /EHsc /Zi /Fd..\..\gdal.pdb -I..\..\port -I..\..\ogr -I..<br>\..\gcore&nbsp; -I..\..\alg -ID:\WORK\kakadu /DKDU_PENTIUM_MSVC /GX /c jp2kakdataset.
<br>cpp<br>jp2kakdataset.cpp<br>jp2kakdataset.cpp(119) : fatal error C1083: Cannot open include file: 'jp2_local<br>.h': Invalid argument<br>NMAKE : fatal error U1077: 'cl' : return code '0x2'<br>Stop.<br>--------------------------------------------------------------------------------------------------------------------------
<br><br>Where can I find jp2_local.h in order to build GDAL?<br><br>Thanks a lot.<br>Best regards,<br><br>Daniele<br><br>PS: I will point you to the sample file later on. Before, I just want to do other attempts with JP2K :)
<br><br><br><div><span class="gmail_quote">On 12/7/06, <b class="gmail_sendername">Frank Warmerdam</b> &lt;<a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Daniele Romagnoli wrote:<br>&gt; Hi List,<br>&gt; after my last exam, I'm back working on GDAL ImageIO integration proposal.<br><br>Daniele,<br><br>That's great news!<br><br>&gt; I have some questions...<br>&gt; I'm using a 12 bit Jpeg2k sample, which shows up fine in Java using the
<br>&gt; ImageIO pure Java reader based on JJ2000.<br>&gt;<br>&gt; When opening this image with OpenEV or using gdalinfo, it says that the<br>&gt; image is 8 bit.<br>&gt; When using JAVA GDAL Bindings the image seems to be 16 bit since the
<br>&gt; Data Type we get is /GDT_UInt16/ . With no surprise the displayed image<br>&gt; is darker than expected.<br><br>I can see no obvious reason for gdalinfo reporting something different<br>than you get from the bindings unless the builds are really quite
<br>different.&nbsp;&nbsp;Can you point me to the sample file in question?<br><br>As for darker/lighter that can be highly affected by how the application<br>chooses to scale the 16bit image to 8bit.&nbsp;&nbsp;In particular OpenEV has<br>some fairly fancy logic for computing a default scaling.
<br><br>&gt; As an aside, is it normal that I do not get any metadata back using the<br>&gt; Java Bindings for this jp2 image? I iwas hoping to get information about<br>&gt; the image type directly from metadata.<br><br>Metadata generally contains information beyond the basic structural
<br>information such as datatype, pixels and lines, geolocation, coordinate<br>system.&nbsp;&nbsp;In any event, there isn't currently a mechanism for capturing<br>metadata from jpeg2000 in the various jpeg2000 drivers as far as I am
<br>aware.&nbsp;&nbsp;The exception is fhat if you read a GMLJP2 file, and you request<br>metadata from the &quot;GML&quot; domain you should get the gmlcoverage XML document<br>back from the metadata api.<br><br>&gt; What can I do to know in advance from GDAL that this image is 12 bit?
<br><br>Consulting the band data type should be the right way, and it should<br>report GDT_UInt16 from gdalinfo, openev and your calls to the bindings<br>if you are really using the same library version in all cases.<br><br>
Best regards,<br>--<br>---------------------------------------+--------------------------------------<br>I set the clouds in motion - turn up&nbsp;&nbsp; | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>
<br>light and sound - activate the windows | <a href="http://pobox.com/~warmerdam">http://pobox.com/~warmerdam</a><br>and watch the world go round - Rush&nbsp;&nbsp;&nbsp;&nbsp;| President OSGeo, <a href="http://osgeo.org">http://osgeo.org</a>
<br><br></blockquote></div>