beagle r4705 - in trunk/beagle/Util/F-Spot: Imaging upstream-changes



Author: dbera
Date: Sun Apr 13 21:18:13 2008
New Revision: 4705
URL: http://svn.gnome.org/viewvc/beagle?rev=4705&view=rev

Log:
Add old 03-jfif.diff


Added:
   trunk/beagle/Util/F-Spot/upstream-changes/09-jfif.diff
Modified:
   trunk/beagle/Util/F-Spot/Imaging/JpegHeader.cs

Modified: trunk/beagle/Util/F-Spot/Imaging/JpegHeader.cs
==============================================================================
--- trunk/beagle/Util/F-Spot/Imaging/JpegHeader.cs	(original)
+++ trunk/beagle/Util/F-Spot/Imaging/JpegHeader.cs	Sun Apr 13 21:18:13 2008
@@ -258,6 +258,7 @@
 	}
 
 	public static Signature JfifSignature = new Signature (JpegMarker.App0, "JFIF\0");
+	public static Signature ComSignature = new Signature (JpegMarker.Com, null);
 	public static Signature JfxxSignature = new Signature (JpegMarker.App0, "JFXX\0");
 	public static Signature XmpSignature = new Signature (JpegMarker.App1, "http://ns.adobe.com/xap/1.0/\0";);
 	public static Signature ExifSignature = new Signature (JpegMarker.App1, "Exif\0\0");
@@ -332,6 +333,20 @@
 		}
 	}
 
+	public string GetJFIFComment ()
+	{
+		string name = ComSignature.Name;
+		Marker marker = FindMarker (ComSignature);
+
+		if (marker == null)
+			return null;
+
+		if (marker.Data != null && marker.Data.Length != 0)
+			return System.Text.Encoding.Default.GetString (marker.Data, 0, marker.Data.Length);
+
+		return null;
+	}
+
 	public XmpFile GetXmp ()
 	{
 		string name = XmpSignature.Name;

Added: trunk/beagle/Util/F-Spot/upstream-changes/09-jfif.diff
==============================================================================
--- (empty file)
+++ trunk/beagle/Util/F-Spot/upstream-changes/09-jfif.diff	Sun Apr 13 21:18:13 2008
@@ -0,0 +1,37 @@
+From: Debajyoti Bera <dbera web gmail com>
+
+Extract Jfif comments from Jpeg files.
+
+Index: Imaging/JpegHeader.cs
+===================================================================
+--- Imaging/JpegHeader.cs	(revision 4703)
++++ Imaging/JpegHeader.cs	(working copy)
+@@ -258,6 +258,7 @@
+ 	}
+ 
+ 	public static Signature JfifSignature = new Signature (JpegMarker.App0, "JFIF\0");
++	public static Signature ComSignature = new Signature (JpegMarker.Com, null);
+ 	public static Signature JfxxSignature = new Signature (JpegMarker.App0, "JFXX\0");
+ 	public static Signature XmpSignature = new Signature (JpegMarker.App1, "http://ns.adobe.com/xap/1.0/\0";);
+ 	public static Signature ExifSignature = new Signature (JpegMarker.App1, "Exif\0\0");
+@@ -332,6 +333,20 @@
+ 		}
+ 	}
+ 
++	public string GetJFIFComment ()
++	{
++		string name = ComSignature.Name;
++		Marker marker = FindMarker (ComSignature);
++
++		if (marker == null)
++			return null;
++
++		if (marker.Data != null && marker.Data.Length != 0)
++			return System.Text.Encoding.Default.GetString (marker.Data, 0, marker.Data.Length);
++
++		return null;
++	}
++
+ 	public XmpFile GetXmp ()
+ 	{
+ 		string name = XmpSignature.Name;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]