Hmmm... something about leaving little turds in every directory you may visit, 
which may or may not belong to you, seems weird. (I'm not sure "the Windows 
file browser does it" is a good justification for anything.)  Also, a central 
location seems like a much better way to ensure that they can be cleaned up or 
limited to a reasonable total size.

How about a preference to let users choose a directory to store the thumbnails, 
which would default to $HOME but could be set elsewhere, including "." to 
indicate that .ivthumb should be in the directory of the images themselves, for 
those who really prefer it.

I don't see why the thumbnails would use any new format; obviously we'd use one 
of the ones we can already read and write.  Surely the thumbnails can save only 
3 channels, 8 bits each, etc; there's no reason why the cached thumbnails, 
which are not viewed in high fidelity themselves but are just visual mnemonics 
for selection, need to support the full range of features of their original 
images.  The most important thing about thumbnails is that they read very fast, 
so I would benchmark our ability to read small images of the various formats 
and pick whichever is fastest.  TIFF?  PNG?  Targa?  They're already tiny, so I 
don't even know if we should care about compression.

Yes, good point, you'd want to be sure it knew not to generate a thumbnail of 
the thumbnail!  I think that generalizes to the following: if the image 
resolution is within some factor of the desired size of our thumbnails, just 
read it directly rather than making a thumbnail.  For example, if our 
thumbnails are 80x60, say (I'm just guessing), then probably you only want to 
cache thumbnails for images under, I don't know, 256 or 512 pixels or more.  
Smaller images than that are so inexpensive to read that it's not worth 
caching.  This logic would naturally exclude thumbnails of thumbnails.


On Mar 31, 2012, at 12:11 PM, Jonathan Gibbs wrote:

> On Sat, Mar 31, 2012 at 11:12 AM, Larry Gritz <[email protected]> wrote:
>> Should there be a cache
>> of thumbnails on disk (say, in $HOME/.ivthumb/*)?
> 
> Or a .ivthumb file in the same directory as the images? Of course one
> might not be able to write there, but it is closer to the images and
> could be shared by multiple people using iv, is more naturally deleted
> when the images are, etc.
> 
> Isn't this what Windows file browser does? (thumbs.db)
> 
> Is there a standard file format for this kind of thing? OIIO already
> supports file formats which can store many named images. It might be
> cool to use one of these so OIIO tools could actually
> read/process/generate this file itself. (But iv would have to be
> careful not to thumbnail it's thumbnail file if someone tried to view
> it!)
> 
> What does a thumbnail of a image file with multiple image in it look like?
> 
> --jono
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

--
Larry Gritz
[email protected]


_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to