rejetto forum

Jpg-image Template

dj · 9 · 9333

0 Members and 1 Guest are viewing this topic.

Offline dj

  • Tireless poster
  • ****
    • Posts: 291
  • 👣 🐾
    • View Profile
    • PWAs
shows thumbnails for previewing the pictures

digital cameras uses exif metadata, covering a thumbnail

the template downloads only the first 64kB from images
and extract the thumbnails

V1 includes an pictureviewer
seems also to work with some mp3 (and mp4 with preload="metadata")

V1.1 use a single function, thanks rejetto
V1.2 show more cover
V1.3 uses webworker (for many files)
pictureviewer plays audio (click/touch for next)
V2.0 done serverside (now shows only DateTime, no thumb), playlist
V1.4 show thumbs, DateTime, Title
V1.5 Icons view (/?view)
« Last Edit: February 08, 2016, 05:55:12 AM by dj »


Offline bmartino1

  • Tireless poster
  • ****
    • Posts: 910
  • I'm only trying to help i mean no offense.
    • View Profile
    • My HFS Google Drive Shared Link

Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
very very interesting dj, thank you for posting it.
I've been thinking about something like this for long time.
Sadly it is not working very well for me, only with few pics. Maybe these files are missing the exif thumbnail.
Anyway, the code deserves to be put in a single function, as in this form it is duplicated for every image. I made some work in this direction but it's not working anymore, something is wrong, and it's very late so i have to stop for now.


Offline LeoNeeson

  • Tireless poster
  • ****
    • Posts: 842
  • Status: On hiatus (sporadically here)
    • View Profile
    • twitter.com/LeoNeeson
Yes, thank you "DJ" for this, it's great. :)

> One crazy idea (I'm the guy of the crazy ideas, lol ;D): what about reading the thumbnails generated by Windows (Thumbs.db), only if the image doesn't have the EXIF Metadata thumbnail embedded. Obviously the user must have the Windows option to generate image thumbnails (Thumbs.db). This was proposed long time ago, here. Is it possible?...
HFS in Spanish (HFS en Español) / How to compile HFS (Tutorial)
» Currently taking a break, until HFS v2.4 get his stable version.


Offline dj

  • Tireless poster
  • ****
    • Posts: 291
  • 👣 🐾
    • View Profile
    • PWAs
Hi Leo,

it's not possible for me (thumb.db is centralized)
what i can do, is show the Folder.jpg (add Folder.jpg to hfs file system)

Code: [Select]
[folder]
<tr><td style="display:flex"><input type='checkbox' class='selector' name='selection' value="%item-url%" {.if not|{.or|{.get|can delete.}|{.get|can access.}|{.get|can archive item.}.}|disabled='disabled'.} />
%new% %protected% <img src="%item-url%Folder.jpg" style="width:64px;height:64px; object-fit:cover"/>
<a href="%item-url%"> %item-name%</a>%item-comment%
<td>%item-size%<td>%item-modified%<td>%item-dl-count%

Update: show image in xspf-playlist:

Code: [Select]
[file.xspf]
{.load|%item-folder%%item-name%|var=x.}
<tr><td style="display:flex" title="{.regexp|<title>(.+?)<|var=x.}">
<input type='checkbox' class='selector' name='selection' value="%item-url%" {.if not|{.or|{.get|can delete.}|{.get|can access.}|{.get|can archive item.}.}|disabled='disabled'.} />
%new% %protected% <a href="{.regexp|([^>]+?)<\/(link{:|:}info)>|var=x.}"><img src="{.regexp|<image>(.+?)<|var=x.}" style="width:64px;height:64px; object-fit:cover"/></a>
<a href="%item-url%"> %item-name%</a> %item-comment%
<td>%item-size%<td>%item-modified%<td>%item-dl-count%
« Last Edit: February 15, 2016, 06:22:36 PM by dj »


Offline bmartino1

  • Tireless poster
  • ****
    • Posts: 910
  • I'm only trying to help i mean no offense.
    • View Profile
    • My HFS Google Drive Shared Link
windows 7 on up auto generate a tumbs files in the directory when more than 5 picture formats are in it.

most people turn thums off on widows at it can be unnecessary casheing:
http://www.techsupportalert.com/content/what-are-thumbsdb-files-and-can-i-delete-them-windows.htm

and ther is a defult path to the centralized thumbs...
https://en.wikipedia.org/wiki/Windows_thumbnail_cache

%userprofile%\AppData\Local\Microsoft\Windows\Explorer

i haven't dived into your code yet, but i think it would be possible to get access to the thumbs data file
Files I have snagged and share can be found on my google drive:

https://drive.google.com/drive/folders/1qb4INX2pzsjmMT06YEIQk9Nv5jMu33tC?usp=sharing


Offline LeoNeeson

  • Tireless poster
  • ****
    • Posts: 842
  • Status: On hiatus (sporadically here)
    • View Profile
    • twitter.com/LeoNeeson
it's not possible for me (thumb.db is centralized)
Yes, I've read that "thumb.db" is centralized starting Windows Vista and 7 onwards, BUT at least on Windows XP systems there is a "thumb.db" file on every folder (unless you have that option disabled). I only have XP to test it, sorry...

windows 7 on up auto generate a tumbs files in the directory when more than 5 picture formats are in it.
Good to know that, may be this was added again on Windows 7 SP1?... ???
HFS in Spanish (HFS en Español) / How to compile HFS (Tutorial)
» Currently taking a break, until HFS v2.4 get his stable version.


Offline casey

  • Occasional poster
  • *
    • Posts: 7
    • View Profile
Sorry to reply to this old topic. I need a template with preview pict. I try this and just get the blank screen.
Maybe I install in bad way. Please someone advice. Help!


Offline dj

  • Tireless poster
  • ****
    • Posts: 291
  • 👣 🐾
    • View Profile
    • PWAs
Don't change the standard template. Put the hfs.diff.tpl in your picture-folder. http://rejetto.com/forum/index.php?topic=11754.msg1061359#msg1061359

For preview pict you need thumbnails (or a lot of memory)
check if you have thumbnails in your photos http://exif.regex.info/exif.cgi
otherwise you can generate it with http://rejetto.com/forum/index.php?topic=11298.msg1061004#msg1061004
« Last Edit: July 06, 2018, 12:07:07 PM by dj »