Author: krasnov
Date: 2005-09-07 11:40:40 -0400 (Wed, 07 Sep 2005)
New Revision: 49640
Modified:
trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ChangeLog
trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ImageCodec.jvm.cs
Log:
ImageCodecInfo.jvm.cs: fixed GetValueFromMetadata, SetResolution
Modified: trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ChangeLog
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ChangeLog
2005-09-07 15:37:25 UTC (rev 49639)
+++ trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ChangeLog
2005-09-07 15:40:40 UTC (rev 49640)
@@ -1,5 +1,9 @@
2005-09-07 Vladimir Krasnov <[EMAIL PROTECTED]>
+ * ImageCodecInfo.jvm.cs: fixed GetValueFromMetadata, SetResolution
+
+2005-09-07 Vladimir Krasnov <[EMAIL PROTECTED]>
+
* ImageCodecInfo.jvm.cs: Refactoring
* Added ImageCodec.jvm.cs
Modified:
trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ImageCodec.jvm.cs
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ImageCodec.jvm.cs
2005-09-07 15:37:25 UTC (rev 49639)
+++ trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ImageCodec.jvm.cs
2005-09-07 15:40:40 UTC (rev 49640)
@@ -470,6 +470,9 @@
else
resUnitsType =
GetValueFromMetadata(resUnitsPath);
+ if (resUnitsType == null)
+ resUnitsType = rc.UnitsTypeDefault;
+
// Unit scale
string unitScale =
rc.UnitsScale[resUnitsType].ToString();
@@ -480,7 +483,11 @@
protected string GetValueFromMetadata(string path) {
- return
MetadataDocument.SelectSingleNode(path).InnerText;
+ XmlNode n = MetadataDocument.SelectSingleNode(path);
+ if (n == null)
+ return null;
+
+ return n.InnerText;
}
private void XmlConvert(dom.Node jNode, XmlNode nNode) {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches