2003.06.23

Here’s my problem: I’ve got this application that deals with loading images, and no one thought to save any useful metadata when loading an image, they just save the name of the image, so on occasion an image will get loaded again after it’s been loaded. This might be fine because the image might have been edited in some way, but if it didn’t change we waste time loading it again. What to do? I suppose the right way would be to actually save the proper metadata for the image, but my short term solution might be this: use md5sum to check the already loaded image, and the image waiting to be loaded, if they are the same, don’t load it, just discard it. Do you see any problems with this idea? (In theory the md5sum should give a fingerprint of the file, and it should be unique, so if that changes, then the images changes.) I won’t be able to do it on the fly, as they are large files, and md5sum is not fast enough, but I can preprocess the list of files waiting to be loaded…

Just off the top of my head, I think the metadata I would save is:

  • name
  • width
  • height
  • date created
  • date modified
  • file size
  • md5sum

I’m sure there’s other bits as well, but that’s my quick list.

Comments are closed.

« | »


buy the button:

Buy The Button