rejetto forum

thumbnails

0 Members and 1 Guest are viewing this topic.

Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13294
    • View Profile
i've found that extracting the thumbnail that's sometimes embedded in a jpeg can be easy with a method that's probably not 100% reliable but took me little work.
I'm going to introduce this new feature even if the default tpl will not make use of it for now.
It can be considered experimental.
The feature works like this: you append ?mode=thumb to the url of a jpg file.
The thumbnail itself is served as a file. If not available you'll get a 404.
Generating a thumbnail is of course much worse on the CPU and poses some serious concerns: store it? and where?
It may be introduced in the future, but it's not a quick job as the one i just did.

You'll find it in the RC7 i'm going to release soon.
« Last Edit: August 02, 2020, 04:21:31 PM by rejetto »


Offline dj

  • Tireless poster
  • ****
    • Posts: 224
  • 👣 🐾
    • View Profile
    • PWAs
I recommend to store it in a subfolder thumb on Upload (similar mobillight).
I will write the addon, when I'm Back from Holidays.
« Last Edit: August 02, 2020, 07:14:30 PM by dj »


Offline dj

  • Tireless poster
  • ****
    • Posts: 224
  • 👣 🐾
    • View Profile
    • PWAs
show the Server generated thumbnails (for now without saving)



jpgimgthumb_Store.diff.tpl works only with mobillight for now
I can't get the 'load' macro to run with images
« Last Edit: Yesterday at 05:04:01 AM by dj »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13294
    • View Profile
I can't get the 'load' macro to run with images

i don't understand what you meant


Offline dj

  • Tireless poster
  • ****
    • Posts: 224
  • 👣 🐾
    • View Profile
    • PWAs
I tried it first server side.

{.load|smallpic.jpg|var=mytext.}
{.save|test.jpg|var=mytext.}

test.jpg is saved, but not readable (format not supported)


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 1988
    • View Profile
what you would like are macros like "load bin" and "save bin" using a buffer variable

load and save only deal with text files, and besides this can create some problems when used with different encoding formats (ansi utf8 utf16 ...)


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13294
    • View Profile
just as mars said.
if you need them to make cool stuff we can add them.