1

I wrote an app for Windows and macOS and I am in the process of porting it to Linux. My app has a file browser implemented and can display thumbnails or document icons of files.

On Windows I get access to the file thumbnails (or document icons if there is no thumbnail support) through the shell extensions.

On MacOS I can generate the thumbnails (or document icons) through QuickLook.

On Linux, what would be the way to go to...

1... generate a thumbnail e.g. for JPEGs, PNGs 2... fallback to extract document icons for the file if no thumbnail is available?

Thank you!

2
  • I know about this specific thumbnailer solution, called "tumbler"; it has been created for the XFCE desktop: docs.xfce.org/xfce/tumbler/start Maybe you could consider making it a dependency of your app, and let it do the thing for you? Or if you want to use some more direct approach, try to unearth one of the thumbnailer plugins tumbler uses under the hood: I guess the PixBuf thumbnailer plugin could be a versatile choice: docs.xfce.org/xfce/tumbler/available_plugins
    – Levente
    Jun 12 at 14:43
  • Refer to any good GUI file manager such as nemo (for example). Jun 12 at 22:51
0

1... generate a thumbnail e.g. for JPEGs, PNGs

GraphicsMagick/ImageMagick

I can't think of any APIs for Linux which can be used for that. GTK/Qt/FLTK/Enlightenment have widely different image libraries. In theory you could use libpng/libjpeg-turbo/libtiff and other similar libraries for other formats and then resize using your own algorithms.

2... fallback to extract document icons for the file if no thumbnail is available?

I don't understand this question, sorry.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.