Re: md5_sum column - Developing command line tool for F-Spot



On ma, 2010-05-31 at 19:58 +0200, Robert Latest wrote:
> Hello all,
> 
> I'm currently developing a generic C library that will solve all these
> problems. Actually I'm doing it for a different purpose that doesn't
> have anything to do with images, but it'll work just as well. Some
> charateristics:
> 
> - C library with dependency only on sqlite3 (so it can be easily liked
> to any code)
> - Synchronisation with minimal overhead (i.e., based on md5 sums the
> code will be able to determine if a file has been copied, moved or
> renamed)
> - Generic library that can be used on any type of file
> 
> The idea is that if you muck around in your directory with other
> tools, a quick synchronization will bring everything back in order,
> and if a file's content doesn't change, neither will its ID, no matter
> if it is renamed or moved.
> 
> The current, pre-alpha version of the code fully catalogs 22k photos
> in less than 10 minutes on my six-year old, 1GHz/512MB machine. A
> resync after adding or moving a few dozen files takes only a few
> seconds.
> 
> This isn't magic, it's just that the f-spot code is extremely
> inefficient. There's no point in creating a thumbnail image just to
> get a signature on a file. I like f-spot's high-level GUI
> functionality (myself I'm really bad at GUI coding), but the
> nitty-gritty core stuff needs some serious help.

Oh yes, that's extremely true, it certainly shows it's age. C# isn't
hard and any help is greatly appreciated.

> That said I'm not sure when my code will be far enough along to be let
> out into the wild in any form. Don't hold your breath. I'll keep you
> posted.
> 
> robert
> 
> On Sun, May 30, 2010 at 10:35 PM, Johan Zaxmy <johan zaxmy com> wrote:
> > sön 2010-05-30 klockan 19:52 +0200 skrev Robin Clarke:
> >> My problem: To search local files and identify whether they are in the
> >> database yet, I want to create the md5 hash, and search the database for
> >> this hash.  Problem is that the md5 hash I generate for a known image
> >> doesn't come out the same as the one in the database.  I've heard that
> >> it is just the image data which is used (without the meta data), but if
> >> someone has some more specific information, that would be very helpful.
> >
> >
> > This seems to be the c# code that generates the md5 sum. Hope it will
> > help you...
> >
> >
> >     public static string GenerateMD5 (SafeUri uri)
> >      {
> >         try {
> >            if (md5_cache.ContainsKey (uri))
> >               return md5_cache [uri];
> >
> >            using (Gdk.Pixbuf pixbuf = ThumbnailGenerator.Create (uri))
> >            {
> >               byte[] serialized = GdkUtils.Serialize (pixbuf);
> >               byte[] md5 = MD5Generator.ComputeHash (serialized);
> >               string md5_string = Convert.ToBase64String (md5);
> >
> >               md5_cache.Add (uri, md5_string);
> >               return md5_string;
> >            }
> >         } catch (Exception e) {
> >            Log.DebugException (String.Format ("Failed to create MD5Sum
> > for Uri: {0}\n", uri), e);
> >         }
> >
> >         return string.Empty;
> >      }
> >
> > regards
> > Johan, not a C# guru either
> >
> > _______________________________________________
> > f-spot-list mailing list
> > f-spot-list gnome org
> > http://mail.gnome.org/mailman/listinfo/f-spot-list
> >
> _______________________________________________
> f-spot-list mailing list
> f-spot-list gnome org
> http://mail.gnome.org/mailman/listinfo/f-spot-list
> 


-- 
Ruben Vermeersch (rubenv)
http://www.savanne.be/



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