[gdal-dev] How can I do to load into a Bitmap an ECW image from GDAL?

Francisco José Reyes Peralta gistdt08 at hotmail.es
Mon Apr 18 11:01:46 EDT 2011


Dear friend,
Using, to try gdal 1.8, the following code i cannot find the ECW driver in the list of drivers.

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load        Dim GDAL As String = ";"        GDAL &= Application.StartupPath & "\GDAL"        Dim CAMINO As String = Environment.GetEnvironmentVariable("PATH")        CAMINO &= ";" & GDAL        Environment.SetEnvironmentVariable("PATH", CAMINO)        OSGeo.GDAL.Gdal.AllRegister()
        Dim drvcount As Integer = OSGeo.GDAL.Gdal.GetDriverCount        Dim listadrivers As New List(Of String)
        For i As Integer = 0 To drvcount - 1            listadrivers.Add(OSGeo.GDAL.Gdal.GetDriver(i).LongName)
        Next
        listadrivers.Sort()

        For Each item In listadrivers            ComboBox1.Items.Add(item.ToString)        Next
    End Sub
I put in the Bin\Debug\ folder the GDAL and reference de gdal_csharp.dll file in my CSharp project and doesn't work.
Anybody have the same problem?
I install the exe that you tell me and copy later the gdal folder into my project. Also I reference and activate gdal in my form_load event.
Thanks in advanced.
Francisco J.
> Date: Mon, 18 Apr 2011 14:19:42 +0200
> From: jrepetto at free.fr
> To: gdal-dev at lists.osgeo.org
> CC: gistdt08 at hotmail.es
> Subject: Re: [gdal-dev] How can I do to load into a Bitmap an ECW image from GDAL?
> 
> Le 18/04/2011 12:26, Francisco José Reyes Peralta a écrit :
> >
> > I'm using GDAL 1.8.0, with the csharp dlls loaded into my project.
> >
> > I can load another images but ECW I cannot load into my project.
> >
> > Is needed another dll as the*libecwj2.dll*?
> >
> > Is supported by GDAL this images actually? In the support formats you can find ECW file supported.
> >
> > I'm using WindowsXP 32bits, and OsGeo.Gdal, OsGeo.OGR, y OsGeo.OSR namespaces.
> 
> Francisco,
> 
> Try to install gdal-18-1600-core.msi and gdal-18-1600-ecw.msi that 
> you'll find on the page :
> <http://vbkto.dyndns.org/sdk/PackageList.aspx?file=release-1600-gdal-1-8-0-mapserver-5-6-6.zip>
> 
> Jean-Claude
> 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110418/9c4a347c/attachment-0001.html


More information about the gdal-dev mailing list