rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: KalleB on August 30, 2007, 02:08:43 PM

Title: Feature Req: Utilizing thumbs.db for image gallery
Post by: KalleB on August 30, 2007, 02:08:43 PM
Hello again..

Besides plain filesharing, I'd say hosting image (& video) gallery is one thing many people would like to be able to use their HFS for. They could just drop their image folder into HFS, select 'Gallery' option and a gallery with thumbnails would be shown instead of the normal file listing. Currently I've used XnView (http://www.xnview.com/) to generate web page with thumbs and hosted it on my HFS but this requires _a lot_ of work and it's almost impossible for a novice to do.

So if HFS could simply read (and maybe also generate if not exist) normal windows thumbs.db files and use images inside them as thumbnails on generated web page.

Of cource HFS could have it's own thumbnail generator but I think that would require tons of more work and would be slow & heavy feature. Getting the thumbs from thumbs.db is quite fast and simple operation I believe..

Gallery could be very simple one (f.ex: http://uri.fi/xnviewgalleryexample/) but of cource it would be nice to have also template tags available for image resolution, dpi, exif infos etc. like in xnview does but that's not important really...
Title: Re: Feature Req: Utilizing thumbs.db for image gallery
Post by: Unknown8063 on August 30, 2007, 02:58:30 PM
This sounds like a bad idea.  What about those of us using Windows Vista (or Linux via WINE)?

http://en.wikipedia.org/wiki/Thumbs.db

As for using a different thumbnail generator, have you tried the one the ToG and Terayon team made?

http://www.rejetto.com/forum/index.php?topic=4646.0
Title: Re: Feature Req: Utilizing thumbs.db for image gallery
Post by: TSG on August 30, 2007, 03:05:10 PM
I have often thought of this... I knew windows cached up the thumbnails but never thought of suggesting it to the forum because it depends on the size of the images thumbs.db serves, if they aren't heavily compressed... only high bandwidth hosts can serve them nicely.

I like my thumbnails to be within 1-3kb/image 50x50 - 100x100px cropped, so it looks nice and neat. The thumbs generated by thumbs.db appear to be raw image resizes to fit an x height, or width.

Although i like the idea cause it is easy to set up once it is working. All a user has to do is enable thumbnails and browse the folders on their computer to cache up all the thumbs. It'd be interesting to find out the file size of these images. And if this is possible. I hope it is good news :)


I WAS JUST ABOUT TO SAY THAT Unknown8063 :P u beat me to it.

Linux seems to generate thumbs (ubuntu feisty fawn) but i don't know where they go, and Vista can have really huge 256px width.... i really don't see this idea working out at all.

Use the generator we created  :-\.... BTW we plan on upgrading that again soon. Once the beta of Terayon 1.3.0 is stable.

Attached is what the inside of thumbs.db actually looks like... for laughs :P... what language is that...
Title: Re: Feature Req: Utilizing thumbs.db for image gallery
Post by: Giant Eagle on August 30, 2007, 03:43:43 PM
Use the generator we created  :-\.... BTW we plan on upgrading that again soon. Once the beta of Terayon 1.3.0 is stable.

Yep, a generator that is even more customizable than before. 3 Different main settings: Terayon v1.2.1+ or ToG (forgot the version that was required:P) or Custom

With custom, you can specify the width and height of both the thumbnails and previews, name the folder where you want to place them and some more settings.

The best thing that will be improved is that it will no longer use an external program (like irfan view) but it will generate the thumbnails by itself. :)
Title: Re: Feature Req: Utilizing thumbs.db for image gallery
Post by: KalleB on August 30, 2007, 06:57:27 PM
Attached is what the inside of thumbs.db actually looks like... for laughs :P... what language is that...
Binary language  ;)

As for the ToG & Terayon thumb generator, it's very good but not near as simple and straightforward as I'd like this whole precedure to be. It's a bit easier than using XnView though, but since I'm not using ToG or Terayon, there's not much use for it. You see, I have a few not so tech-savvy friends who'd like to share their images like I have done with my HFS & XnView. They are hardly able to drag & drop files and folders into their HFS to share them :D ..so it shouldn't be any harder than that.

I only now found out that it's only WinXP and Vista that use thumbs.db and even they in different ways, so maybe that's not a good solution afterall (...and linux (at least kde) stores thumbs in a hidden folder inside user's home dir.)

So I think HFS should integrate something like that ToG & Terayon thumb generator in it and use it when "Use as gallery" (or something like that) is selected from the folder menu.
Title: Re: Feature Req: Utilizing thumbs.db for image gallery
Post by: TSG on August 30, 2007, 10:47:24 PM
As for the ToG & Terayon thumb generator, it's very good but not near as simple and straightforward as I'd like this whole precedure to be...

So I think HFS should integrate something like that ToG & Terayon thumb generator in it and use it when "Use as gallery" (or something like that) is selected from the folder menu.

It's very simple, it creates thumbnails and previews, stores them in a hidden folder, ready for HFS to use, all you have to do is paste the right image location into a [file.jpg = file.png etc..] section and bam instant gallery.... O_o the whole idea was to make a simple generator to compress images for a gallery... But u cant just have a 'GO' button cause people want varying degrees of compression, image size *next build* and options to choose... We have optimized the settings so that people may simply run the generator standard if they wish... Those are the settings we use for our servers.

How much more simple can it be lol...

I do doubt HFS will ever carry that kind of support... at least not until HFS supports php... ino i'd rather rejetto worked on php support and fixing the [FIX] items in the to-do, than a gallery creator lol.

Thats where we come in. Use our generator. If you have any suggestions to make it less complicated... tell us in the Thumbnail and Preview Generator thread before we start work on the next version :)...

Integrating our Generator into HFS would.. i dunno.. we'd have to translate it into Delphi i guess....
Title: Re: Feature Req: Utilizing thumbs.db for image gallery
Post by: Giant Eagle on August 31, 2007, 07:33:55 AM
Maybe we could make it read a FileSystem.vfs so that it shows a full tree where you can select the folders from.  8)

And have Basic and Expert mode, Basic just needs a folder and template and BAM there are your thumbnails =D
Title: Re: Feature Req: Utilizing thumbs.db for image gallery
Post by: TSG on August 31, 2007, 09:12:01 AM
You think you can do that?

Ye Basic and Expert would be good i think.

Interface needs work... i'll hopefully have some time to help you with that by the time we work on it... but lets not get off topic here. If we want to discuss the T& P Generator, lets move this conversation to http://www.rejetto.com/forum/index.php?topic=4529.0  ;)
Title: Re: Feature Req: Utilizing thumbs.db for image gallery
Post by: KalleB on August 31, 2007, 10:30:10 AM
I would be satisfied if your generator could:

1) Find my HFS & it's setting from my machine (reg or ini)
   - If it can't find it from the defaut location then of course ask
2) Find out (from the settings file) what VFS file I use currently
3) Close HFS (to save any possible changes to the current VFS)
4) Load that VFS into generator
5) Allow me to simply select which folders I'd like to have the gallery for (and optionally their subfolders)
6) Generate images & edit the VFS respectively (apply Diff Template for the gallery folders)
7) Save VFS and load it to HFS again  8)

...This way it might be easy enough even for novice.

I'm not sure about the (6), if it's the best way to do things...just the first idea that came to me. It means that the generator would also have those .tpl files matching HFS's templates. These *.gallery.tpl's would have only the [files] section (and maybe [styles]) edited to display thumb gallery. This way ToG, Terayon and the default template could all have their own editable gallery.tpl files which would then be set as the Diff Template for the gallery folders. Hope you understand what I'm trying to say :D

I think there also should be an option to save the thumb either to the folder where the original images are OR to HFS's program folder. Personally I hate if something (like some image viewers) create index files or something like that to my image folder thus destroying folder dates & times.
Title: Re: Feature Req: Utilizing thumbs.db for image gallery
Post by: TSG on August 31, 2007, 11:40:07 AM
I would be satisfied if your generator could:

1) Find my HFS & it's setting from my machine (reg or ini) -- Why, to find the .vfs?
   - If it can't find it from the defaut location then of course ask
2) Find out (from the settings file) what VFS file I use currently -- Could be possible, i understand why.
3) Close HFS (to save any possible changes to the current VFS) -- Why not just save options?
4) Load that VFS into generator -- Idea mentioned earlier by GE
5) Allow me to simply select which folders I'd like to have the gallery for (and optionally their subfolders) -- Probably.
6) Generate images & edit the VFS respectively (apply Diff Template for the gallery folders) -- Little harder, unsure.
7) Save VFS and load it to HFS again  8) -- Obviously :P

...This way it might be easy enough even for novice. -- doubt it, they would only understand it if they have used HFS for a while, i didn't know about Diff Template till a few months ago. We'd have to clearly state in the generator "Apply Gallery Template to this folder" in a right click menu i think.

I'm not sure about the (6), if it's the best way to do things...just the first idea that came to me. -- thought so...

It means that the generator would also have those .tpl files matching HFS's templates. These *.gallery.tpl's would have only the [files] section (and maybe [styles]) edited to display thumb gallery. This way ToG, Terayon and the default template could all have their own editable gallery.tpl files which would then be set as the Diff Template for the gallery folders. Hope you understand what I'm trying to say :D -- Nice idea, but hard to implement correctly... We plan on making a gallery template for both templates, the table thumbnails will still remain tho, along with the previews.

I think there also should be an option to save the thumb either to the folder where the original images are OR to HFS's program folder. Personally I hate if something (like some image viewers) create index files or something like that to my image folder thus destroying folder dates & times. -- don't think the current method has this problem, select 'Don't Log' on the thumb folders. It uses a hidden folder. I don't think the HFS's program folder part is viable. Link is better to be the same for all think.


Found it easier to answer your post by putting notes... hope you don't mind :)
Title: Re: Feature Req: Utilizing thumbs.db for image gallery
Post by: Giant Eagle on August 31, 2007, 07:31:05 PM
I'm not sure about the (6), if it's the best way to do things...just the first idea that came to me. It means that the generator would also have those .tpl files matching HFS's templates. These *.gallery.tpl's would have only the [files] section (and maybe [styles]) edited to display thumb gallery. This way ToG, Terayon and the default template could all have their own editable gallery.tpl files which would then be set as the Diff Template for the gallery folders. Hope you understand what I'm trying to say :D

It doesnt need to edit the VFS at all :S, there's a way to set a diff template externally: 'hfs.diff.tpl'. It just has to be placed in the folder where you want that tpl to be active in and that folder, aswell as the sub-folders, will have that template.

BUT!! (<- - really big but over there!)
I wont start on this project until Terayon v1.3.0 has been released.

I recently updated my fileserver to beta #3 (http://www.fileserver.nl.tp), i noticed that the DivX player is not working (>_< Wow, didnt see that coming! [/sarcasm]).

Anyway, we might ask rejetto how the .vfs file actually works and how it is generated. Maybe he can help us out on that one (oh rejettooo! :P)

Title: Re: Feature Req: Utilizing thumbs.db for image gallery
Post by: KalleB on August 31, 2007, 08:39:56 PM
It doesnt need to edit the VFS at all :S, there's a way to set a diff template externally: 'hfs.diff.tpl'. It just has to be placed in the folder where you want that tpl to be active in and that folder, aswell as the sub-folders, will have that template.

 :o That's again something new for me. But as I already said in my previous post, I don't like any program "messing up" my photo archives (actually, I've even locked all the albums with ntfs rights so that changing their contents is not possible 8)). So I think adding only Diff template settings into VFS for the gallery folders would be pretty neat solution. Diff template can be used to override just some sections of the main template (like the [files] & [style] I already mentioned), doesn't it(?)

1) Find my HFS & it's setting from my machine (reg or ini)
-- Why, to find the .vfs?
   --yep
...
3) Close HFS (to save any possible changes to the current VFS)
-- Why not just save options?
  --is it possible to just command HFS to save its current VFS?
...
This way it might be easy enough even for novice.
-- doubt it, they would only understand it if they have used HFS for a while, i didn't know about Diff Template till a few months ago. We'd have to clearly state in the generator "Apply Gallery Template to this folder" in a right click menu i think.
  -- of course most of those procedures would be totally automatic and invisible to the user. Users should only start the generator, select which folders to apply the gallery for, maybe select recursive or not and click OK. Everything else would be set automatically but would be still customizable by clicking some "Advanced" button.
...
I think there also should be an option to save the thumb either to the folder where the original images are OR to HFS's program folder.
--I don't think the HFS's program folder part is viable. Link is better to be the same for all think.
  --Why wouldn't it be viable? I think it's very easy to set the gallery template to fetch the thumbs like <IMG SRC="./thumbs/%item-name%"> OR <IMG SRC="/thumbs/drive/original/album/path/%item-name%">. With "Save to HFS folder" option selected, the generator would add that (hidden, not browsable) real folder named "thumbs" to the VFS root.
Title: Re: Feature Req: Utilizing thumbs.db for image gallery
Post by: Giant Eagle on August 31, 2007, 09:00:29 PM
KalleB
-- That Stevens Guy
  -- KalleB
    -- Me

1) Find my HFS & it's setting from my machine (reg or ini)
-- Why, to find the .vfs?
   --yep
    -- Should be do-able
...
3) Close HFS (to save any possible changes to the current VFS)
-- Why not just save options?
  --is it possible to just command HFS to save its current VFS?
    -- Yep
...
This way it might be easy enough even for novice.
-- doubt it, they would only understand it if they have used HFS for a while, i didn't know about Diff Template till a few months ago. We'd have to clearly state in the generator "Apply Gallery Template to this folder" in a right click menu i think.
  -- of course most of those procedures would be totally automatic and invisible to the user. Users should only start the generator, select which folders to apply the gallery for, maybe select recursive or not and click OK. Everything else would be set automatically but would be still customizable by clicking some "Advanced" button.
    -- that advanced button would be "Expert mode". Anyway, most users somewhat alter their templates, i dont think it will be easy to create a gallery.. one small change could ruin their templates. And another thing, reading the vfs is one thing, but inputting a diff template into it is a whole different story, ill just stick the the external part (hfs.diff.tpl) its way easier to set-up and remove (its exactly the same as 'diff template' for folders, xept that it is external. The file itself is even hidden!)
...
I think there also should be an option to save the thumb either to the folder where the original images are OR to HFS's program folder.
--I don't think the HFS's program folder part is viable. Link is better to be the same for all think.
  --Why wouldn't it be viable? I think it's very easy to set the gallery template to fetch the thumbs like <IMG SRC="./thumbs/%item-name%"> OR <IMG SRC="/thumbs/drive/original/album/path/%item-name%">.
    -- the static link (<IMG SRC="/thumbs/drive/original/album/path/%item-name%">) is not water-proof: if 2 images have the same name but are both in a different folder, they will both have the same thumbnail (cause of the thumbnail having the same name), But you will be able to set a relative path of your own instead of our ./previews_and_thumbnails/
Title: Re: Feature Req: Utilizing thumbs.db for image gallery
Post by: KalleB on August 31, 2007, 09:12:02 PM
-- the static link (<IMG SRC="/thumbs/drive/original/album/path/%item-name%">) is not water-proof: if 2 images have the same name but are both in a different folder, they will both have the same thumbnail (cause of the thumbnail having the same name), But you will be able to set a relative path of your own instead of our ./previews_and_thumbnails/

It is waterproof since those "drive", "original", "album" and "path" are set to the Diff template by the generator. Maybe I should have clarified it a bit more..

F.ex: Your gallery is at D:\Images\MyGal1. The generator creates folders "D", "Images" and "MyGal1" to the HFS program folder one inside another and the thumbs inside the last one. The thumnail images at the gallery page are now pointed to <IMG SRC="/thumbs/D/Images/MyGal1/%item-name%">.
I don't see how this wouldn't be waterproof...
Title: Re: Feature Req: Utilizing thumbs.db for image gallery
Post by: Giant Eagle on August 31, 2007, 09:39:54 PM
Yes, that would be waterproof. But why use the path used by windows and not the path used by HFS? would make more sense to me :) (and probably novice users aswell)
Title: Re: Feature Req: Utilizing thumbs.db for image gallery
Post by: Comrade Elisey on September 01, 2007, 01:37:02 AM
hey, people! I know that 7-Zip archiver can unpack thumbs.db file & other not popular formats!  ;)
http://www.7-zip.org (http://www.7-zip.org)
Title: Re: Feature Req: Utilizing thumbs.db for image gallery
Post by: TSG on September 01, 2007, 03:58:07 AM
Yes, that would be waterproof. But why use the path used by windows and not the path used by HFS? would make more sense to me :) (and probably novice users aswell)

Agreed

This is good feedback and constructive ideas, i like it :)
Title: Re: Feature Req: Utilizing thumbs.db for image gallery
Post by: rejetto on September 05, 2007, 06:33:39 AM
Anyway, we might ask rejetto how the .vfs file actually works and how it is generated. Maybe he can help us out on that one (oh rejettooo! :P)

you really need to know?
Title: Re: Feature Req: Utilizing thumbs.db for image gallery
Post by: rejetto on September 05, 2007, 06:39:04 AM
:o That's again something new for me. But as I already said in my previous post, I don't like any program "messing up" my photo archives (actually, I've even locked all the albums with ntfs rights so that changing their contents is not possible 8)).

i tried changing the content of a folder on my ntfs, and the creation timestamp was not changed.

Quote
So I think adding only Diff template settings into VFS for the gallery folders would be pretty neat solution.

it's much harder, the hfs.diff.tpl solution will suit most people, especially your non-techie friends ;)

Quote
Diff template can be used to override just some sections of the main template (like the [files] & [style] I already mentioned), doesn't it(?)

sure, that's what the "diff" stands for
Title: Re: Feature Req: Utilizing thumbs.db for image gallery
Post by: Foggy on September 05, 2007, 06:41:02 AM
Anyway, we might ask rejetto how the .vfs file actually works and how it is generated. Maybe he can help us out on that one (oh rejettooo! :P)

you really need to know?

I dont need to know, but I am interested how it works :P
Title: Re: Feature Req: Utilizing thumbs.db for image gallery
Post by: rejetto on September 05, 2007, 06:45:42 AM
hey, people! I know that 7-Zip archiver can unpack thumbs.db file & other not popular formats!  ;)

i use 7-zip. thumbs.db is not listed on the supported formats, and indeed it failed when i tried to unpack it.
Title: Re: Feature Req: Utilizing thumbs.db for image gallery
Post by: Foggy on September 05, 2007, 07:02:58 AM
hey, people! I know that 7-Zip archiver can unpack thumbs.db file & other not popular formats!  ;)

i use 7-zip. thumbs.db is not listed on the supported formats, and indeed it failed when i tried to unpack it.

I did a google search for "extract thumbs.db" (http://www.google.com.au/search?hl=en&q=extract+thumbs.db&btnG=Search&meta=) and got a couple results but I cant say if they have any good information or work.

Thumbs.db whitepaper?? (http://www.accessdata.com/media/en_US/print/papers/wp.Thumbs_DB_Files.en_us.pdf)

Script to extract thumbs.db (http://sourceforge.net/projects/vinetto)

and many more ;)
Title: Re: Feature Req: Utilizing thumbs.db for image gallery
Post by: Comrade Elisey on September 05, 2007, 07:40:43 AM
Quote
i use 7-zip. thumbs.db is not listed on the supported formats, and indeed it failed when i tried to unpack it.
update your 7-zip to last non-stable version & check that feature again!  :P