rpms/f-spot/F-7 f-spot-0.3.5-resizefilter.patch, NONE, 1.1 f-spot.spec, 1.46, 1.47

Christopher Aillon (caillon) fedora-extras-commits at redhat.com
Tue Nov 13 11:24:19 UTC 2007


Author: caillon

Update of /cvs/extras/rpms/f-spot/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9308

Modified Files:
	f-spot.spec 
Added Files:
	f-spot-0.3.5-resizefilter.patch 
Log Message:
* Tue Nov 13 2007 Christopher Aillon <caillon at redhat.com> - 0.3.5-4
- Do not ignore the 'resize image' setting when exporting


f-spot-0.3.5-resizefilter.patch:

--- NEW FILE f-spot-0.3.5-resizefilter.patch ---
--- f-spot-0.3.5/src/Filters/ResizeFilter.cs	2007-01-09 02:07:23.000000000 +0000
+++ f-spot-0.4.0/src/Filters/ResizeFilter.cs	2007-08-01 20:09:06.000000000 +0100
@@ -43,29 +43,32 @@
 			System.Uri dest_uri = req.TempUri (System.IO.Path.GetExtension (source));
 			string dest = dest_uri.LocalPath;
 
-			ImageFile img = ImageFile.Create (source);
-			using (Pixbuf pixbuf = img.Load ((int)size, (int)size)) {
-
-				if (pixbuf.Width < size && pixbuf.Height < size)
-					return false;
-
-				string destination_extension = Path.GetExtension (dest);
-
-				if (Path.GetExtension (source).ToLower () == Path.GetExtension (dest).ToLower ()) {
-					using (Stream output = File.OpenWrite (dest)) {
-						img.Save (pixbuf, output);
-					}
-				} else if (destination_extension == ".jpg") {
-					// FIXME this is a bit of a nasty hack to work around
-					// the lack of being able to change the path in this filter
-					// and the lack of proper metadata copying yuck
-					Exif.ExifData exif_data;
+			using (ImageFile img = ImageFile.Create (source)) {
 
-					exif_data = new Exif.ExifData (source);
-					
-					PixbufUtils.SaveJpeg (pixbuf, dest, 95, exif_data);
-				} else 
-					throw new NotImplementedException (String.Format (Catalog.GetString ("No way to save files of type \"{0}\""), destination_extension));
+				using (Pixbuf pixbuf = img.Load ()) {
+					if (pixbuf.Width < size && pixbuf.Height < size)
+						return false;
+				}
+	
+				using (Pixbuf pixbuf = img.Load ((int)size, (int)size)) {
+					string destination_extension = Path.GetExtension (dest);
+	
+					if (Path.GetExtension (source).ToLower () == Path.GetExtension (dest).ToLower ()) {
+						using (Stream output = File.OpenWrite (dest)) {
+							img.Save (pixbuf, output);
+						}
+					} else if (destination_extension == ".jpg") {
+						// FIXME this is a bit of a nasty hack to work around
+						// the lack of being able to change the path in this filter
+						// and the lack of proper metadata copying yuck
+						Exif.ExifData exif_data;
+	
+						exif_data = new Exif.ExifData (source);
+						
+						PixbufUtils.SaveJpeg (pixbuf, dest, 95, exif_data);
+					} else 
+						throw new NotImplementedException (String.Format (Catalog.GetString ("No way to save files of type \"{0}\""), destination_extension));
+				}
 			}
 
 			req.Current = dest_uri;
--- f-spot-0.3.5/src/Imaging/ImageFile.cs	2007-01-09 02:07:22.000000000 +0000
+++ f-spot-0.4.0/src/Imaging/ImageFile.cs	2007-08-01 20:09:06.000000000 +0100
@@ -8,7 +8,7 @@
 		}
 	}
 
-	public class ImageFile {
+	public class ImageFile : IDisposable {
 		protected Uri uri;
 
 		static System.Collections.Hashtable name_table;
@@ -53,6 +53,7 @@
 			name_table [".nef"] = typeof (FSpot.Tiff.NefFile);
 			name_table [".pef"] = typeof (FSpot.Tiff.NefFile);
 			name_table [".raw"] = typeof (FSpot.Tiff.NefFile);
+			name_table [".kdc"] = typeof (FSpot.Tiff.NefFile);
 			name_table [".tiff"] = typeof (FSpot.Tiff.TiffFile);
 			name_table [".tif"] = typeof (FSpot.Tiff.TiffFile);
 			name_table [".orf"] =  typeof (FSpot.Tiff.NefFile);
@@ -200,5 +201,15 @@
 
 			return imgtemp;
 		}
+
+		public void Dispose ()
+		{
+			Close ();
+			GC.SuppressFinalize (this);
+		}
+
+		protected virtual void Close ()
+		{
+		}
 	} 
 }


Index: f-spot.spec
===================================================================
RCS file: /cvs/extras/rpms/f-spot/F-7/f-spot.spec,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- f-spot.spec	2 Jul 2007 16:15:55 -0000	1.46
+++ f-spot.spec	13 Nov 2007 11:23:43 -0000	1.47
@@ -1,6 +1,6 @@
 Name:           f-spot
 Version:        0.3.5
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Photo management application
 
 Group:          Applications/Multimedia
@@ -12,6 +12,7 @@
 Patch1: f-spot-0.3.2-libdir.patch
 Patch2: f-spot-0.3.5-desktop-file-validate.patch
 Patch3: f-spot-0.3.5-screensaver.patch
+Patch4: f-spot-0.3.5-resizefilter.patch
 
 BuildRequires:  mono-devel mono-web mono-data mono-data-sqlite lcms-devel
 BuildRequires:  libexif-devel gphoto2-devel >= 2.1.4 
@@ -47,6 +48,7 @@
 %patch1 -p1 -b .libdir
 %patch2 -p1 -b .desktop-file-validate
 %patch3 -p1 -b .screensaver
+%patch4 -p1 -b .resizefilter
 
 %build
 autoconf
@@ -100,6 +102,9 @@
 %{_datadir}/omf/f-spot
 
 %changelog
+* Tue Nov 13 2007 Christopher Aillon <caillon at redhat.com> - 0.3.5-4
+- Do not ignore the 'resize image' setting when exporting
+
 * Mon Jul  2 2007 Christopher Aillon <caillon at redhat.com> - 0.3.5-3
 - Hack to get screensavers to work again (#221546)
 




More information about the fedora-extras-commits mailing list