f-spot r3888 - in trunk/extensions: . DevelopInUFraw
- From: sdelcroix svn gnome org
- To: svn-commits-list gnome org
- Subject: f-spot r3888 - in trunk/extensions: . DevelopInUFraw
- Date: Thu, 8 May 2008 21:29:29 +0100 (BST)
Author: sdelcroix
Date: Thu May 8 20:29:28 2008
New Revision: 3888
URL: http://svn.gnome.org/viewvc/f-spot?rev=3888&view=rev
Log:
2008-05-08 Stephane Delcroix <sdelcroix novell com>
* DevelopInUFraw/DevelopInUFraw.cs: Patch from Pascal de Bruijn to fix
bgo #532018
Modified:
trunk/extensions/ChangeLog
trunk/extensions/DevelopInUFraw/DevelopInUFRaw.addin.xml
trunk/extensions/DevelopInUFraw/DevelopInUFRaw.cs
Modified: trunk/extensions/DevelopInUFraw/DevelopInUFRaw.addin.xml
==============================================================================
--- trunk/extensions/DevelopInUFraw/DevelopInUFRaw.addin.xml (original)
+++ trunk/extensions/DevelopInUFraw/DevelopInUFRaw.addin.xml Thu May 8 20:29:28 2008
@@ -1,6 +1,6 @@
<Addin namespace="FSpot"
id="DevelopInUFraw"
- version="0.4.3.0"
+ version="0.4.3.1"
name="DevelopInUFRaw"
description="Develop the image in UFRaw, saves the result as a new version\n\nNote: Require ufraw 0.13 or CVS version newer than 2007-09-06 !!!"
author="Stephane Delcroix"
Modified: trunk/extensions/DevelopInUFraw/DevelopInUFRaw.cs
==============================================================================
--- trunk/extensions/DevelopInUFraw/DevelopInUFRaw.cs (original)
+++ trunk/extensions/DevelopInUFraw/DevelopInUFRaw.cs Thu May 8 20:29:28 2008
@@ -8,6 +8,7 @@
*/
using System;
+using System.IO;
using FSpot;
using FSpot.Extensions;
@@ -30,10 +31,18 @@
string name = GetVersionName (p);
System.Uri developed = GetUriForVersionName (p, name);
- string args = String.Format("--overwrite --compression=95 --out-type=jpeg --output={0} {1}",
+ string idfile = "";
+
+ if (new Gnome.Vfs.Uri (Path.ChangeExtension (raw.Uri.ToString (), ".ufraw")).Exists) {
+ // We found an ID file, use that instead of the raw file
+ idfile = "--conf=" + Path.ChangeExtension (raw.Uri.LocalPath, ".ufraw");
+ }
+
+ string args = String.Format("--overwrite --create-id=also --compression=98 --out-type=jpeg {0} --output={1} {2}",
+ idfile,
CheapEscape (developed.LocalPath),
- CheapEscape (raw.Uri.ToString()));
- Console.WriteLine ("ufraw "+args);
+ CheapEscape (raw.Uri.ToString ()));
+ Console.WriteLine ("ufraw " + args);
System.Diagnostics.Process ufraw = System.Diagnostics.Process.Start ("ufraw", args);
ufraw.WaitForExit ();
@@ -42,6 +51,13 @@
continue;
}
+ if (new Gnome.Vfs.Uri (Path.ChangeExtension (developed.ToString (), ".ufraw")).Exists) {
+ if (new Gnome.Vfs.Uri (Path.ChangeExtension (raw.Uri.ToString (), ".ufraw")).Exists) {
+ File.Delete (Path.ChangeExtension (raw.Uri.LocalPath, ".ufraw"));
+ }
+ File.Move (Path.ChangeExtension (developed.LocalPath, ".ufraw"), Path.ChangeExtension (raw.Uri.LocalPath, ".ufraw"));
+ }
+
p.DefaultVersionId = p.AddVersion (developed, name, true);
Core.Database.Photos.Commit (p);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]