[Image Thumbnailer] Support eps files
Changes PlannedPublic

Authored by broulik on Sat, Feb 9, 5:56 PM.

Details

Summary

There's a KImageFormats plugin for EPS files, so we can just load them easily as QImage

Test Plan

I now get thumbnails for eps files without having kdegraphcis-thumbnailers (ghostscript/pdf thumbnailer) installed

Diff Detail

Repository
R320 KIO Extras
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Sat, Feb 9, 5:56 PM
Restricted Application added projects: Dolphin, Frameworks. · View Herald TranscriptSat, Feb 9, 5:56 PM
Restricted Application added subscribers: kfm-devel, kde-frameworks-devel. · View Herald Transcript
broulik requested review of this revision.Sat, Feb 9, 5:56 PM

But what happens when both of the thumbnailers are installed?

You'll get a thumbnail either way \o/

ngraham accepted this revision.Sat, Feb 9, 10:28 PM

Cool, this tiny change is certainly much simpler than the whole separate standalone thumbnailer in kdegraphics-thumbnailers.

This revision is now accepted and ready to land.Sat, Feb 9, 10:28 PM
pino added a subscriber: pino.Sat, Feb 9, 10:34 PM

OTOH this will not work if kimageformats is not installed, and the thumbnailer gives no hint about that.

broulik added a comment.EditedSat, Feb 9, 10:47 PM

OTOH this will not work if kimageformats is not installed, and the thumbnailer gives no hint about that.

But it will return false if the creation failed. Not sure if the PreviewJob keeps chugging along or says "you claimed you can handle it and now you cant, screw you, aborting"

Ah, yeah, it tries and if it fails, it aborts, it doesn't try every thumbnailer that claims to support a format.

broulik planned changes to this revision.Sat, Feb 9, 10:49 PM
pino added a comment.Sat, Feb 9, 10:52 PM

Then just ship a desktop file for that format in kimageformats:

  • if kio-extras is not installed, that desktop file will be unused (although just a couple of kilobytes on disk)
  • if ko-extras is installed, it will register PS as thumbnail format using imagethumbnail

The same change can IMHO be done for all the formats currently in MimeType, and that provided by kimageformats.

But that will create additional, potentially defunct entries in Previewer settings?

pino added a comment.Sat, Feb 9, 11:03 PM

But that will create additional, potentially defunct entries in Previewer settings?

without kio-extras there isn't any previewer available...