! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Tumbler specialised thumbnailer for Krita files *.kra
Status:
RESOLVED: WORKSFORME
Severity:
enhancement
Product:
Tumbler
Component:
General

Comments

Description David Revoy 2014-10-07 13:50:20 CEST
Hi, I'm trying to find a way to make a specialised thumbnailer in the code of Tumbler ( http://git.xfce.org/xfce/tumbler/ ) to get thumbnails of my digital-painting and comic pages in Thunar. I'm a beginner in XFCE source code and I'm a graphist curious enough to tweak source-code here and there. Not really an experienced developer. My current status is I succeed at grabbing the source of Tumbler, compile it, and using the version I was able to compile on Xubuntu 14.04; but the change I tried to hack myself are failure.

The *.kra files thumbnail specifications 'looks' simple ;
extension : *.kra
mimetype : application/x-krita
structure : a ZIP archive , with at the root preview.png ( 255px max in width or height, color ) generated by Krita itself while saving.
[ Example pack of *.kra files : http://sta.sh/0t7lpv6ehgw , CC-By files of my open webcomic http://www.davidrevoy.com/static3/pepper-and-carrot ]

So, the Krita documents looks really similar to the structure of a ODF document ( open office documents or open raster *.ora ) with also a ZIP container, and a thumbnail ready-made inside ( exept in the odf standards, the place of the thumbnail is in a subfolder  /Thumbnails/thumbnail.png ). The similar structure is why I first thought of extending the ODF plugin ( http://git.xfce.org/xfce/tumbler/tree/plugins/odf-thumbnailer ).

My (beginner) attempt so far :

l.135 in plugins/odf-thumbnailer/odf-thumbnailer-provider.c :
 "application/x-krita",
... because I see all the other mimetype listed here.

l.212 in plugins/odf-thumbnailer/odf-thumbnailer.c
thumb_file = gsf_infile_child_by_vname (infile, "Thumbnails", "thumbnail.png", "preview.png", NULL);
... because I thought inside the parenthesis it was a array of pattern for the thumbnail name the program is looking for.

But the result is not working, and also break other ODF thumbnails.
Thanks for your advices if you guide me to make this specialized thumbnailer for *.kra working in Thunar.
Comment 1 Ali Abdallah editbugs 2017-05-28 20:40:20 CEST
Please see release 0.1.92.1. You have now the possibility of extending Tumbler using a simple script. 

https://mail.xfce.org/pipermail/xfce-announce/2017-May/000518.html
https://mail.xfce.org/pipermail/xfce-announce/2017-May/000519.html
Comment 2 David Revoy 2017-06-21 01:40:00 CEST
Thank you @Ali for this news. It will then work perfectly with :

https://github.com/Deevad/gnome-kra-ora-thumbnailer
or 
https://moritzmolch.com/1749

Big thanks for making Tumbler flexible. 
This bug-report can be closed.

Bug #11224

Reported by:
David Revoy
Reported on: 2014-10-07
Last modified on: 2020-05-17

People

Assignee:
Ali Abdallah
CC List:
1 user

Version

Attachments

Additional information