Review Request 121886: Fix thumbnailing (for filemanager) by separate thumbnailer for Krita file types
Friedrich W. H. Kossebau
kossebau at kde.org
Wed Jan 7 21:40:15 GMT 2015
> On Jan. 7, 2015, 9:12 vorm., Boudewijn Rempt wrote:
> > Honestly, I'd say, don't bother with trying to render a krita or ora document if there's no thumbnail or merged image to use.
> >
> > ORA has:
> >
> > * Thumbnails/thumbnail.png
> > * mergedimage.png
> >
> > KRA has:
> > * preview.png
> > * mergedimage.png
> >
> > Actually rendering a document using krita is always going to be extremely tricky because of all the delayed action and threading involved.
> >
> > This might mean no thumbnails for some very odd .kra or .ora files, but it's preferable to linking in all of Krita.
>
> Boudewijn Rempt wrote:
> Oh, there's another reason for not loading all of Krita in the thumbnailer -- it would mean that any application that opens a file dialog will load all of krita. All the resources will be loaded as well -- it's the reason the kimgio plugin relies exlcusively on the mergedimage.png now.
>
> Friedrich W. H. Kossebau wrote:
> (thumbnailer is only loaded into the kio-thumbnail process, so not really affecting the application itself, besides eating systemmemory for some time until the kio-thumbnail process is time-outed shutdown)
>
> Okay, as you recommend. What is the content of the mergedimage.png, is it a full rendering of the image at full size? So should and could be used in a scaled version if the embedded thumbnail is too small? Would update the PR to that tonight then.
>
> Boudewijn Rempt wrote:
> Yes, it's the full rendered image. It's what the kimgio plugin uses to show the image in e.g. gwenview.
Some older files created with Krita I had on my harddisk do not yet have "mergedimage.png" though. Is that file required by the specs of ORA/KRA, or optional?
In any case, to support older files, the second edition of the thumbnailer I just uploaded deals with "mergedimage.png" not present.
- Friedrich W. H.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/121886/#review73335
-----------------------------------------------------------
On Jan. 7, 2015, 9:38 nachm., Friedrich W. H. Kossebau wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/121886/
> -----------------------------------------------------------
>
> (Updated Jan. 7, 2015, 9:38 nachm.)
>
>
> Review request for Calligra and Boudewijn Rempt.
>
>
> Repository: calligra
>
>
> Description
> -------
>
> The central Calligra thumbnailing plugin for filemanagers assumes document classes to be based on KoDocument & KoPart. Which no longer holds true for Krita after MVC got merged, KisDocument has nothing to do with that.
>
> So a separate thumbnailer with KisDocument specific code is needed. And here I propose a first version. It should make thumbnailing for ORA, KRA and KRAANIM files work again.
>
> Despite being a plugin (for the KDE filemanager thumbnailing system) I did not put the thumbnailer into `krita/plugins`, but instead added a subdir `krita/integration`, given this is not a plugin _for_ Krita, but _from_ Krita for other systems. I would also propose to move `krita/plugins/kimgio` to that new subdir, for consistency.
>
> TODO:
> when behind the scenes the thumbnailing plugin is shutdown due to being unused, it crashes e.g. like this
> ```
> CRITICAL: According to statistics of the KisTileDataStore some tiles have leaked from the Krita control!
> CRITICAL: Tiles in memory: 20034 Total tiles: 20034
> kio_thumbnail(10513)/krita (registry) KisPaintOpRegistry::~KisPaintOpRegistry: Deleting KisPaintOpRegistry
> kio_thumbnail(10513)/krita (registry) KisBrushServer::~KisBrushServer: deleting KisBrushServer
> Fatal Error: Accessed global static 'KisMemoryLeakTracker *s_instance()' after destruction. Defined at /home/koder/Kode/kdegit/Calligra/calligra/krita/image/kis_memory_leak_tracker.cpp:45
> kioslave: ####### CRASH ###### protocol = thumbnail pid = 10513 signal = 6
> ```
> Not perfect (though not preventing any thumbnailing), any idea what might setup/shutdown be missing for the thumbnailer?
>
>
> Diffs
> -----
>
> krita/plugins/formats/ora/krita_ora_thumbnail.desktop a7b0f60
> extras/thumbnail/CMakeLists.txt 6c29b50
> extras/thumbnail/krita_kra_thumbnail.desktop d44255a
> extras/thumbnail/kritaanimation_kranim_thumbnail.desktop cd569b3
> krita/CMakeLists.txt b2691f9
> krita/integration/CMakeLists.txt PRE-CREATION
> krita/integration/thumbnail/CMakeLists.txt PRE-CREATION
> krita/integration/thumbnail/krita_kra_thumbnail.desktop PRE-CREATION
> krita/integration/thumbnail/kritaanimation_kranim_thumbnail.desktop PRE-CREATION
> krita/integration/thumbnail/kritacreator.h PRE-CREATION
> krita/integration/thumbnail/kritacreator.cpp PRE-CREATION
>
> Diff: https://git.reviewboard.kde.org/r/121886/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Friedrich W. H. Kossebau
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20150107/14852afc/attachment.htm>
More information about the calligra-devel
mailing list