Author Topic: Jpg-image Template  (Read 3074 times)

0 Members and 1 Guest are viewing this topic.

Offline dj

  • Experienced poster
  • ***
  • Posts: 40
    • View Profile
Jpg-image Template
« on: January 23, 2016, 02:43:05 PM »
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 07, 2016, 11:55:12 PM by dj »

Follow members gave a thank to your post:


Offline bmartino1

  • Insane poster
  • *****
  • Posts: 742
  • I'm only trying to help i mean no offense.
    • View Profile
    • none - google translate
Re: Jpg-image Template
« Reply #1 on: January 25, 2016, 11:21:27 AM »
Thank you for your work DJ

thought i post this as it seems to be a continuation on some part :)

http://www.rejetto.com/forum/html-templates/file-upload-with-drag-and-drop/msg1061004/?topicseen#msg1061004
I'm only trying to help i mean no offense.
thank you for your time and patience,
Bmartino1

Offline rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12841
    • View Profile
Re: Jpg-image Template
« Reply #2 on: January 25, 2016, 06:14:41 PM »
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

  • Insane poster
  • *****
  • Posts: 423
  • Solitario...
    • View Profile
    • twitter.com/LeoNeeson
Re: Jpg-image Template
« Reply #3 on: January 27, 2016, 11:41:14 PM »
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 ahora también disponible en Español! (Clic aqui) :)
• HFS is now also available in Spanish! (Click here)

Offline dj

  • Experienced poster
  • ***
  • Posts: 40
    • View Profile
Re: Jpg-image Template - Thumbs.db
« Reply #4 on: January 28, 2016, 05:04:09 AM »
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, 12:22:36 PM by dj »

Offline bmartino1

  • Insane poster
  • *****
  • Posts: 742
  • I'm only trying to help i mean no offense.
    • View Profile
    • none - google translate
Re: Jpg-image Template
« Reply #5 on: January 28, 2016, 12:42:16 PM »
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
I'm only trying to help i mean no offense.
thank you for your time and patience,
Bmartino1

Offline LeoNeeson

  • Insane poster
  • *****
  • Posts: 423
  • Solitario...
    • View Profile
    • twitter.com/LeoNeeson
Re: Jpg-image Template - Thumbs.db
« Reply #6 on: January 29, 2016, 04:25:23 AM »
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 ahora también disponible en Español! (Clic aqui) :)
• HFS is now also available in Spanish! (Click here)