I am having a problem loading a JP2000 Image. I am running Windows 7 64bit. I don't have problem loading any other image type. I have successfully ran all the How To samples and also have tested Mr. Sid. I also can view the .jp2 file in other software, e.g. lizardtech geoviewer and ESRI ArcMap. The images I have are quite large 1.81 GB and 1.27GB.
I use the following code to load the image:
Jpeg2000RasterLayer jp2ImageLayer = new Jpeg2000RasterLayer(filename);
jp2ImageLayer.UpperThreshold = double.MaxValue;
jp2ImageLayer.LowerThreshold = 0;
LayerOverlay imageOverlay = new LayerOverlay();
imageOverlay.Layers.Add("SidImageLayer",jp2ImageLayer);
winformsMap1.Overlays.Add(imageOverlay);
jp2ImageLayer.Open();
winformsMap1.MapUnit = GeographyUnit.Meter;
winformsMap1.CurrentExtent = jp2ImageLayer.GetBoundingBox();
jp2ImageLayer.Close();
winformsMap1.Refresh();
I get two problems. When I try to open the layer, jp2ImageLayer.Open(); I get a warning:
The assembly named 'MapSuiteEcwX64' was loaded from 'file:///C:/Windows/SysWow64/MapSuiteGeoRasterX64/MapSuiteEcwX64.DLL' using the LoadFrom context. The use of this context can result in unexpected behavior for serialization, casting and dependency resolution. In almost all cases, it is recommended that the LoadFrom context be avoided. This can be done by installing assemblies in the Global Assembly Cache or in the ApplicationBase directory and using Assembly.Load when explicitly loading assemblies.
I am able to continue and get the dreaded vshost.exe has stopped working after winformsMap1.Refresh(); It outputs three files into my temp directory.One .txt and one .xml. It also dumps what appears as a binary file *.hdmp, which is 123MB. I have attached the .txt and .xml file.
Any feedback is greatly appreciated. Thanks!
Eric
1853-WERFC2.tmp.appcompat.txt (13.5 KB)
1854-WERFADB.tmp.WERInternalMetadata.xml (3.9 KB)