[haiku-development] Re: Image icons for images in Tracker

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 02 Mar 2012 11:01:22 +0100

On 03/02/2012 10:45 AM, Stephan Aßmus wrote:
However. All that said, I would strongly urge you not to change
*anything* in Tracker (well, except see below). Instead, change
BIconUtils in the Interface Kit. Make it return icons based on the image
of the file. And please also special case using the JPEG translator,
such that it returns the thumbnail from the EXIF data, which it is
capable of. You have to read the translator's code to see how.

You mean to do this on the fly each time? That would be way too slow, if that's your intention. Instead, BIconUtils should support reading bitmap images from BEOS:ICON as well.

Since BIconUtils will necessarily work synchronously, putting the logic to create the previews there won't really work that well. Instead, I would still let Tracker create them when needed -- and also update them when needed, ie. it should also store the last modified time of the file into the icon attribute to see whether it's outdated or not.

BIconUtils OTOH could trigger the update of the icon (like updating the MIME type of some file) asynchronously whenever needed, though. The icon creator could then either still be Tracker, or could also be offloaded to another process.

Bye,
   Axel.

Other related posts: