Showing posts with label thumbnail. Show all posts
Showing posts with label thumbnail. Show all posts

Sunday, March 10, 2013

Using the actual Thumbnail attribute in Tracker

While working on my earlier post about updating the Thumbnail application, I was reminded of a nagging irritation I've had not only since I started using Thumbnail, but especially since larger icon size options in tracker were added by John Scipione back in hrev44422.

In essence the problem is that currently Tracker uses either the BEOS:M:STD_ICON or BEOS:L:STD_ICON attributes to display the icon for the file in Tracker. But since these icons come from more than 15 years ago back in the BeOS days, those icon sizes are 16px and 32px respectively, on top of being dithered. (See the "GetIcon(), SetIcon(), GetTrackerIcon()" section of the BNodeInfo page in the BeBook for more info.)

While those may not look too terrible at those very small sizes (and even that is definitely arguable), the problem is that the 32px BEOS:L:STD_ICON is the biggest one we have to work with when it comes to showing a preview of the actual image for image files. So this gets scaled up double for even 64px sizes, triple for 96px, and quadruple for 128px sizes.

You can see the result of this for 96px sizes in the image below showing the current way it's done. And that's not even the worst example.

Now, what I noticed while tweaking the binaries for that earlier release was that there is also a GRAFX:Thumbnail attribute set, which includes a high quality (up to) 96px actual thumbnail version of the image. I kept finding myself wondering why the heck Tracker refused to use this far superior thumbnail even when I was using the largest icon size options.

I haven't gotten an answer to that question yet... as to whether or not it just hasn't been coded yet... or there is actually an ideological reason why not to do it, or even something architectural preventing it.

In the meantime, here are two images... the first of the way it is now... and the second showing how it could look if Tracker used the GRAFX:Thumbnail attribute instead.

Current Tracker settings
Mockup of using Thumbnail attribute

Some tweaks and updates to Thumbnail

Awhile back I ran across a handy little program called Thumbnail that could be used to create embedded thumbnails (and other info, like image dimensions) in the resources of image files so that, for instance, the image icons would actually show little previews of the image itself, and you could sort the images by dimensions, etc.

Unfortunately the way it handled the image dimension attributes was a bit different than what is used by Tracker in Haiku today. So Haiku user bbjimmy did some manual tweaks to the app's resources (hex editing the binaries using DiskProbe) and brought it a little more up to date to be functional with Haiku today.

Inspired by this, I decided to also create a new HVIF icon for it: Thumbnail.hvif.zip

I also think it would be great to be able to get our hands on the original source code, but thus far I haven't had any luck tracking down the author, Thorsten Seitz, who wrote the app around 15 years ago. :(

So in the meantime, you can download the file(s) here:

Here is the original package that was made for BeOS R4. This doesn't work quite right with Haiku.

Here is the updated version for Haiku which includes the English and German versions, updated documentation, and the HVIF icon for it.

I hope you enjoy it as much as I do.

I had a few other thoughts while putting this new package together, but I'll save them for another post. ;)