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



Author: dbera
Date: Sun Apr 13 20:42:45 2008
New Revision: 4701
URL: http://svn.gnome.org/viewvc/beagle?rev=4701&view=rev

Log:
Import old 05-bim-PHUT.diff 


Added:
   trunk/beagle/Util/F-Spot/upstream-changes/05-bim-PHUT.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 20:42:45 2008
@@ -380,7 +380,14 @@
 			using (System.IO.Stream bimstream = new System.IO.MemoryStream (marker.Data, len,
 											marker.Data.Length - len, false)) {
 
-				FSpot.Bim.BimFile bim = new FSpot.Bim.BimFile (bimstream);
+				FSpot.Bim.BimFile bim;
+				try {
+					bim = new FSpot.Bim.BimFile (bimstream);
+				} catch {
+					// Bim entry with marker "PHUT" is not handled by Bim.cs
+					return null;
+				}
+
 				// FIXME: What about EntryType.XMP ?
 				FSpot.Bim.Entry iptc_entry = bim.FindEntry (FSpot.Bim.EntryType.IPTCNAA);
 				if (iptc_entry == null)

Added: trunk/beagle/Util/F-Spot/upstream-changes/05-bim-PHUT.diff
==============================================================================
--- (empty file)
+++ trunk/beagle/Util/F-Spot/upstream-changes/05-bim-PHUT.diff	Sun Apr 13 20:42:45 2008
@@ -0,0 +1,24 @@
+From: Debajyoti Bera <dbera web gmail com>
+
+Bim entry with marker "PHUT" is not handled by Bim.cs.
+
+Index: Imaging/JpegHeader.cs
+===================================================================
+--- Imaging/JpegHeader.cs	(revision 4700)
++++ Imaging/JpegHeader.cs	(working copy)
+@@ -380,7 +380,14 @@
+ 			using (System.IO.Stream bimstream = new System.IO.MemoryStream (marker.Data, len,
+ 											marker.Data.Length - len, false)) {
+ 
+-				FSpot.Bim.BimFile bim = new FSpot.Bim.BimFile (bimstream);
++				FSpot.Bim.BimFile bim;
++				try {
++					bim = new FSpot.Bim.BimFile (bimstream);
++				} catch {
++					// Bim entry with marker "PHUT" is not handled by Bim.cs
++					return null;
++				}
++
+ 				// FIXME: What about EntryType.XMP ?
+ 				FSpot.Bim.Entry iptc_entry = bim.FindEntry (FSpot.Bim.EntryType.IPTCNAA);
+ 				if (iptc_entry == null)



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