2010-05-27 William Holmes <billholmes54@gmail.com>
[mono.git] / mcs / class / System.Drawing / System.Drawing.Imaging / ImageCodec.jvm.cs
index 2eff947138a3e543eb60a9fcdf6d0aaa667ed8b6..8ded371ba7523563123e6639120dba51be139e9b 100644 (file)
@@ -249,8 +249,8 @@ namespace Mainsoft.Drawing.Imaging {
 
                        internal Hashtable Iterate () {
                                // TBD: Insert Exception handling here
-                               NameValueCollection nvc = (NameValueCollection) System.Configuration.ConfigurationSettings
-                                       .GetConfig ("system.drawing/codecs");
+                               NameValueCollection nvc = (NameValueCollection) System.Configuration.ConfigurationSettings\r
+                                       .GetConfig ("mainsoft.drawing/codecs");
                                Hashtable codecs = new Hashtable (10);
                        
                                for (int i=0; i<nvc.Count; i++) {
@@ -297,9 +297,9 @@ namespace Mainsoft.Drawing.Imaging {
 
                private static ImageFormat MimeTypesToImageFormat (string [] mimeTypes) {
                        foreach (ImageCodecInfo codec in Decoders.Values)
-                               for (int i=0; i<mimeTypes.Length; i++)
-                                       if (codec.MimeType == mimeTypes [i])
-                                               return new ImageFormat (codec.FormatID);
+                               for (int i=0; i<mimeTypes.Length; i++)\r
+                                       if (codec.MimeType == mimeTypes [i])\r
+                                               return ClsidToImageFormat (codec.Clsid);\r
                        return null;
                }
 
@@ -545,8 +545,8 @@ namespace Mainsoft.Drawing.Imaging {
                                return new float[]{0, 0};\r
 \r
                        ResolutionConfigurationCollection rcc = 
-                               (ResolutionConfigurationCollection)
-                               ConfigurationSettings.GetConfig("system.drawing/codecsmetadata");
+                               (ResolutionConfigurationCollection)\r
+                               ConfigurationSettings.GetConfig ("mainsoft.drawing/codecsmetadata");
 
                        if (rcc == null)
                                throw new ConfigurationException("Configuration section codecsmetadata not found");