Re: How do I use RawPlusJpeg?



On Di, 2008-01-08 at 11:27 +0100, Stephane Delcroix wrote:
> comparing the exif is an option, but that could take ages to process

You could compare the time fields from the DB if the directory doesn't
match. So the condition for matches would be:

 same prefix AND (same directory OR same time)

Still feeling like a noob, I wonder if changing the code like this would
have any negative impact despite that the method name would be subject
to change:

--- extensions/RawPlusJpeg/RawPlusJpeg.cs       (revision 3530)
+++ extensions/RawPlusJpeg/RawPlusJpeg.cs       (working copy)
@@ -66,7 +66,7 @@
 
                private static bool SamePlaceAndName (Photo p1, Photo p2)
                {
-                       return DirectoryPath (p1) == DirectoryPath (p2) && 
+                       return (DirectoryPath (p1) == DirectoryPath (p2) || p1.Time == p2.Time) &&
                                System.IO.Path.GetFileNameWithoutExtension (p1.Name) == System.IO.Path.GetFileNameWithoutExtension (p2.Name);
                }
 

Maybe the time should additionally be checked to be >0 to skip images
without EXIF information?

[x] ulf 

-- 
Der Mensch ist immer noch der beste Computer. (John F. Kennedy)



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