Jump to content

943 - custom thumbnail


Uwe

Recommended Posts

Hello,

 

in the news you wrote:

- Now it's possible custom thumbnail for some file that can not be rendered by Daminion using complimentary filename.ext.thumbnail.jpg preview file

 

I used any of the existing JPGs, moved it to the folder of the ZIP-file, renamed it as recommended and made a rescan folders and then also the CTRL-B for the ZIP-File. The JPG is not used as the thumbnail of the ZIP-File. it is additionally imported by the Rescan Folders action. See screenshot:

Daminion_943_custom_thumbnail.JPG

Which formats are supported or is it a bug?

Maybe it is easier to have a certain folder for all thumbnail files following this name format: ext.thumbnail.jpg; e.g. zip.thumbnail.jpg or svg.thumbnail.jpg, etc. If there is a format that is not rendered by Daminion you can read the thumbnail from this folder.

 

Regards, Uwe

Link to comment
Share on other sites

Sorry, I was in a hurry yesterday: the correct format is: filename.ext.thumb.jpg

 

Maybe it is easier to have a certain folder for all thumbnail files following this name format: ext.thumbnail.jpg; e.g. zip.thumbnail.jpg or svg.thumbnail.jpg, etc. If there is a format that is not rendered by Daminion you can read the thumbnail from this folde

 

These are two different tasks: using filename.ext.thumb.jpg allows you to render and assign thumbnails for individual files.

Link to comment
Share on other sites

I agree, there could be some file type thumbs folder for this.

 

But I think it would be great to always look for a name.ext.thumbnail.jpg file in the file's actual directory, that way we can change even the video files' thumbnail, which is not the best frame in most of times.

 

Hello,

the final solution can be: if there is a filename.ext.thumb.jpg file in the folder, Daminion take this one. If not, Daminion can search for a common ext.thumb.jpg in a certain folder defined in the installation/References

 

Regards, Uwe

Link to comment
Share on other sites

I've changed the filename to filename.ext.thumb.jpg, made a rescan folders and CTRL-B but nothing changed compared to the previous version.

 

This works for standard media formats only (video, PSB, etc...) now, but

it will work for custom media formats starting from the next update.

Link to comment
Share on other sites

Hello,

 

I've tested with MP4 file: it works. But a question: the filename.ext.thumb.jpg is imported too.

Is this what Daminion wanted to do or should the *thumb.jpg file out of import and rescan folder action and therefore not to be imported in the catalog?

 

Regards, Uwe

  • Upvote 1
Link to comment
Share on other sites

In my opinion this thumb.jpg feature could be working with any file type, without exceptions.

If there is a thumb.jpg file, it means that the user wants to use that thumbnail file, it needs to be a default thing, regardless of file types.

So there is no need for filtering the file types, it really doesn't matter if it's a standard media type or a custom file type.

Link to comment
Share on other sites

  • 3 weeks later...

Is it already possible to store the thumbnail-image-files in an extra folder like it was sugested above?

 

I don't like the idea to store the thumbnail-image-files in the same folder where the original files are...

 

The custom thumbnail approach with storing thumbnails in the same folder is required when you need to identify each file with individual icon.

 

Custom thumbnails for user defined media formats should be assigned on the same window where these formats are specified. Added to our feature queue (#3024).

Link to comment
Share on other sites

  • 5 years later...
On 2/2/2014 at 9:18 PM, Murat said:

Custom thumbnails for user defined media formats should be assigned on the same window where these formats are specified. Added to our feature queue (#3024).

Since we did not hear anything else on this topic yet, I wrote a little Python script which creates a thumbnail  (i.e. copies from a model) for a single file or all files with a given extension in a folder and all its subdirectories. To run this script, you need to have Python 3 installed on you computer. I tested it only with Python 3.7 under Windows 10 Version 1809, but it should also work under previous versions of of Windows and Python 3 (but certainly not under Python 2, unless modified).

 

dam_thumbnails.py

Link to comment
Share on other sites

Hello Wilfried,

thank you for the script. It helps to have a better overview to all of the "unknown" formats. I hope that Daminion will support more than the existing file types. It would help to have a global folder to save e.g. "ext.thumb.jpg" files there and Daminion reads this folder to substitute the "unknown mediatype" by the icon defined in this folder. If there is as today an existing "file_name.ext.thumb.jpg" it will be used.

Regards, Uwe

Link to comment
Share on other sites

28 minutes ago, Uwe said:

It would help to have a global folder to save e.g. "ext.thumb.jpg" files there and Daminion reads this folder to substitute the "unknown mediatype" by the icon defined in this folder.

I'll have a look at it. Should not be so difficult. So far, it was the first attempt for a "solution" (or better workaround). In my catalog, I have only one unknown type (gpx), but of course it does make sense to extent it to multiple types.

Link to comment
Share on other sites

On 5/31/2019 at 3:49 PM, Uwe said:

It would help to have a global folder to save e.g. "ext.thumb.jpg" files there

So, I hope, it works ...

Store the attached script into {myprogrampath} and store all thumbnail models with names in the form {ext}.thumb.jpg in subdirectory {myprogrampath}\Images (this will be your "global folder", but only my script can find it - not Daminion). Note, {myprogrampath} does not need to be the same as the drive/path of your media items.

Then you either call the script this way to create thumbnails for .ext1, .ext1 ...

py {myprogrampath}\dam_thumbnails.py {mypicturespath} ext1 ext2 ...

The fully qualified name of a folder or file needs to be the first argument of the command line. If it is a single file, no further arguments are needed and a thumbnail is created, provided the model as described below(*) exists with the matching extension. However, if a second or more parameters are provided, it can to be "-all" or any valid extension. In that case thumbnails are created for all files in the same folder, if the matching model exists.

The 'Open With...' function of the Daminion client always passes the file name to the external program and never only a folder path. If you want to start this script from the Daminion client in order to create thumbnails for all files in a folder, define the external program with:       

My_program_path\dam_thumbnails.py {Filename} "-all"

The parameter -all must be in double quotes, the Executable File = py or python3, My_program_path = the path where your stored the script attached below.

Now you can start it by right clicking any item inside that folder on the thumbnail panel of the Daminion client.

If you do not specify any extensions in the call, the subdirectory Images will be searched for all valid thumbnail models and thumbnails are created for all files found with those extensions.

Note, {mypicturespath} can be a folder with multiple files and all files with appropriate extensions are handled. If {mypicturespath} contains subdirectories, they are all searched too. So in theory, you could created thumbnails for all of your files at once, but I recommend to start with a small folders first. You never know ....

Let me know, it it works or when you have questions. No warranty! Please make sure you have a valid backup! 😎

 

 

dam_thumbnails.py

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...