MapWindow 4 - ActiveX Control Programming : MapWindow Discussion Forum
Dear friends, I'm trying to load and ECW image into my app using the last MapWinGIS.OCX and isn't loaded into my app, and I get a white image. I try to load into my app using the same sentence in the preview version of the ocx and works fine. I great any comment.
Load and ECW image into app with the last MapWinGis.ocx
Posted by: geofran80 ()
Date: July 01, 2008 06:04AM

Dear friends,

I'm trying to load and ECW image into my app using the last MapWinGIS.OCX and isn't loaded into my app, and I get a white image. I try to load into my app using the same sentence in the preview version of the ocx and works fine.

I great any comment.

Thanks for advanced.
Francisco J.

Options: ReplyQuote
Re: Load and ECW image into app with the last MapWinGis.ocx
Posted by: geofran80 ()
Date: July 01, 2008 07:47AM

If found a new dll in the compile library as NCSEcw.dll do I need this? If I need this, how can I do to adapt to the MapWinGis.Image class?

Thanks for advanced.

Francisco J.



Edited 1 time(s). Last edit at 07/01/2008 07:47AM by geofran80.

Options: ReplyQuote
Re: Load and ECW image into app with the last MapWinGis.ocx
Posted by: danames ()
Date: July 01, 2008 11:20AM

Francisco, maybe post your code here. Seems strange that it worked before and stopped now. I'm ashamed to say I don't know what NCSEcw.dll is. Anyone else? - Dan

Options: ReplyQuote
Re: Load and ECW image into app with the last MapWinGis.ocx
Posted by: geofran80 ()
Date: July 01, 2008 11:57AM

Thanks Dan, sorry if the place to post my dubt isn't correct.

The NCSEcw arrive with the MapWinGIS45.zip found in the web [www.mapwindow.com] you can find the file and another that I don't know their use in applications, and because I see ECW i think that maybe useful to load ecw because in the 4.5 release not work the mapwingis.image as ecw files.

The code is:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim filename as string = "C:\Imagen.ecw"
Dim myimage As New MapWinGIS.Image
myimage.Open(filename, MapWinGIS.ImageType.ECW_FILE, True)
AxMap1.AddLayer(myimage, True)
End Sub

This works with another extension (jpg, tif, etc.)

Thanks for your reply.
Francisco J.



Edited 3 time(s). Last edit at 07/01/2008 12:03PM by geofran80.

Options: ReplyQuote
Re: Load and ECW image into app with the last MapWinGis.ocx
Posted by: geofran80 ()
Date: July 01, 2008 12:18PM

Dear Dan and another users, If I try the following tell me that the error is in the open and the addlayer.

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim filename As String = "C:\Documents and Settings\Francisco\Mis documentos\can500_w.ecw"
Dim myimage As New MapWinGIS.Image
Dim success As Boolean
success = myimage.Open(filename)
If success = False Then
MsgBox("Image not opened")
End If
success = AxMap1.AddLayer(myimage, True)
If success = False Then
MsgBox("Image not loaded")
End If
End Sub


I also try:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ofd As New OpenFileDialog
ofd.Filter = "ECW (*.ecw) |*.ecw"
ofd.FileName = ""
Dim filename As String
Dim myimage As New MapWinGIS.Image
If ofd.ShowDialog = Windows.Forms.DialogResult.OK Then
filename = ofd.FileName
myimage.Open(filename, MapWinGIS.ImageType.USE_FILE_EXTENSION)
AxMap1.AddLayer(myimage, True)
End If
End Sub

Either, I cannot load SID images

The files found in the MapWinGIS45.zip are:

geos_c.dll
License.rtf
lti_dsdk_dll.dll
MapWinGIS.ocx
NCScnet.dll
NCSEcw.dll
NCSUtil.dll
proj.dll
xerces-c_1_7_0.dll


Thanks for advanced.

Francisco J.



Edited 7 time(s). Last edit at 07/01/2008 12:48PM by geofran80.

Options: ReplyQuote
Re: Load and ECW image into app with the last MapWinGis.ocx
Posted by: danames ()
Date: July 01, 2008 01:13PM

Francisco, Check this post: [www.mapwindow.org] I think it indicates the files that are necessary for ECW support...

Options: ReplyQuote
Re: Load and ECW image into app with the last MapWinGis.ocx
Posted by: geofran80 ()
Date: July 01, 2008 02:03PM

Thanks Dan, i will try it, i don't remember because i found this dlls and not relate with this error.

Thanks.

Francisco J.

Options: ReplyQuote
Re: Load and ECW image into app with the last MapWinGis.ocx
Posted by: geofran80 ()
Date: July 01, 2008 02:14PM

Dear Dan, i try to load lti_dsdk_dll.dll but I cannot, how can I do to load as reference?

Cheers
Francisco J.

Options: ReplyQuote
Re: Load and ECW image into app with the last MapWinGis.ocx
Posted by: danames ()
Date: July 01, 2008 02:26PM

It just needs to sit in the folder next to your MapWinGIS.ocx activex component. Make sure that you only have one copy of MapWinGIS.ocx on your computer, and that it is registered... then with the correct DLLs sitting next to it, you should be able to open ECW files with no trouble. - Dan

Options: ReplyQuote
Re: Load and ECW image into app with the last MapWinGis.ocx
Posted by: geofran80 ()
Date: July 01, 2008 02:32PM

I recent format my desktop and install the mapwingis ocx and with the preview version of mapwingis.ocx cannot obtain error.

I will follow trying.

If anybody obtain this same error please tell us.

Francisco J.

Options: ReplyQuote
Re: Load and ECW image into app with the last MapWinGis.ocx
Posted by: geofran80 ()
Date: July 01, 2008 02:53PM

I have just reinstall this and follow not working :S.

I don't know why the previews version is not needed the lti_dsdk_dll.dll and load the SID and ECW images, and the new version need this dll and not work.

Thanks for a lot of.

Francisco J.

Options: ReplyQuote
Re: Load and ECW image into app with the last MapWinGis.ocx
Posted by: geofran80 ()
Date: July 01, 2008 03:06PM

I think that the last movement that I have to maked was move the files of C:\Program Files\Common Files\Mapwindow installed of the 4.4 version to the 4.5 and replace all, and works.

It want to say that the last version 4.5 not works in any ambients or PCs with ECW and SID files.

Thanks.

Francisco J.



Edited 1 time(s). Last edit at 07/03/2008 10:28AM by geofran80.

Options: ReplyQuote
Re: Load and ECW image into app with the last MapWinGis.ocx
Posted by: geofran80 ()
Date: July 03, 2008 06:33AM

Dear friends, finally, I try to install in 10 PCs more and give me the same error when I try to load and SID or ECW,but If I copy the files of an previows version the error is not more and can load the images.

Would be possible to change the [www.mapwindow.com] MapWinGis45OCXOnly.exe install to support this error?, I need to aggregate to my SETUP project the MapWinGIS45OcxOnly.exe to I have not to change manually in all PCs the files of common files/mapwindow folder.

Thanks
Francisco J.



Edited 2 time(s). Last edit at 07/03/2008 10:44AM by geofran80.

Options: ReplyQuote
Re: Load and ECW image into app with the last MapWinGis.ocx
Posted by: Rob Cairns ()
Date: September 03, 2008 01:47PM

Has this problem been solved? NCScnet.dll NCSEcw.dll and NCSUtil.dll are all ER Mapper dlls for reading ECW files. In the past the ecw sdk was compiled as a static library and pulled into the gdal.lib so the dlls wern't needed. Altering the gdal nmake.opt file to do that was quite a work of art by Chris Michaelis. MRSID had licensing issues so the lti_dsdk_dll.dll was used instead. It is actually illegal to use lti_dsk_dll.dll in certain countries. I know the final ecw ver 3.3 sdk is hard to build because of java dependencies so maybe the choice was made to keep the ecw dlls external as well.

Rob

Options: ReplyQuote
Re: Load and ECW image into app with the last MapWinGis.ocx
Posted by: cmichaelis ()
Date: September 03, 2008 10:37PM

Rob,

Those DLLs won't link into GDAL properly anymore... primarily because they won't compile or link in Visual Studio 2005, and I wanted to be able to use some of the compiler enhancements/optimizations from 2005 for GDAL. So, DLLs it is. As it turns out, some of our memory access violations were due to the medieval surgery methods I used to get it to link into one file in the first place, so separate DLLs gives us a bit more reliability.

Cheers
--Chris

Options: ReplyQuote


Sorry, only registered users may post in this forum.





Banner Exchange




GISCP.com




Send us your banner logo (160x120) for the space above, and add this MapWindow banner ad to your site:

Just paste this text in your page: