Thanks for the replied Guys.<br><br>My use of GDAL is very generic, allowing any end user visuaise any image format that GDAL supports via a web browser using a Java backing with JNI bindings to GDAL binaries. (This particular 6MB ECW file is one of hundreds that I&#39;ve tested)<br>

<br>The code as-is works for all image formats and for sub-portions of the ECW file.<br><br>I guess my question should be more directed to the Java bindings directly and if there is anythings that I can do there... As its at this stage (allocating the Java memory in byte[] that my applicaiton is running out of memory)<br>

<br>Thanks,<br>Ronan<br><br><br><div class="gmail_quote">On 18 November 2010 15:54, Greg Coats <span dir="ltr">&lt;<a href="mailto:gregcoats@mac.com">gregcoats@mac.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div style="word-wrap: break-word;"><div>From a JPEG2000 image, you can use kdu_expand -reduce to quickly extract an image of the top (or any other) level pyramid. In the example below, I extract from a JPEG2000 image, pyramid level 10 from a 142 GB image in 0.10 seconds. Perhaps you could consider using JPEG2000.</div>

<div>Greg</div><div><br></div><div><div><font face="Courier">$ ls -hl dcua0171_BigTiffYes.tif dcua0171_BigTiffYes_rev.jp2</font></div><div><font face="Courier">  142G Feb 16  2010 dcua0171_BigTiffYes.tif</font></div><div>

<font face="Courier">   58G Feb 16  2010 dcua0171_BigTiffYes_rev.jp2</font></div><div><font face="Courier">$ /usr/bin/time $kdu_expand -i dcua0171_BigTiffYes_rev.jp2 -o reduce10.tif -reduce 10</font></div><div><font face="Courier">Copying Geo  box info, size =     387</font></div>

<div><font face="Courier">        0.10 real         0.08 user         0.02 sys</font></div></div><div><div><font face="Courier">$ ls -hl reduce10.tif</font></div><div><font face="Courier">  143K Nov 18 10:37 reduce10.tif</font></div>

</div><div><div></div><div class="h5"><div><br></div><div><div>On Nov 18, 2010, at 10:24 AM, Ronan Crowley wrote:</div><br><blockquote type="cite">Hi All,<br><br>I&#39;m using GDAL (via Java) to view an ECW file.<br><br>
It generally works fine, however I&#39;m having serious memory issues.<br>
<br>I have a 6MB ECW file, that when I try to view in its entirety I get OutOfMemory errors.<br>

<br>The code I&#39;m using to extract the image is pretty much the code from the GDALtest.java file in the swig sub-project.<br><br>What I&#39;m wodering, is if there is any way to get the number of pyramid levels inside the image and grab the top-most pyramid level image ?<br>



<br>Thanks,<br>Ronan</blockquote></div></div></div></div><br>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br>