如何在 Linux 中使用系统库创建缩略图视图

发布于 2024-08-19 19:30:40 字数 92 浏览 2 评论 0 原文

我想创建类似于 gnome/kde 中显示的缩略图的文件类型的缩略图视图。 想知道是否有人知道 gnome/kde 使用哪些库来显示 Linux 中不同文件类型的缩略图。

I want to create a thumbnail view of a file type similar to thumbnails displayed in gnome/kde.
Wondering if anyone knows which libraries gnome/kde uses to display thumbnail view of different file types in Linux.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

请你别敷衍 2024-08-26 19:30:40

似乎有一个 D-BUS 规范用于将请求发送到名为 Tumber 的跨工具包缩略图服务: http://gezeiten.org/post/2009/10/Using-Tumbler-in-Client-Applications

但文档似乎非常稀疏。

It appears there is a D-BUS specification for sending requests to a cross-toolkit Thumbnailing service called Tumber: http://gezeiten.org/post/2009/10/Using-Tumbler-in-Client-Applications

But documentation seems to be very sparse.

优雅的叶子 2024-08-26 19:30:40

ImageMagick 是一个命令行工具和库。该库具有 C++ 和 Perl 的接口。或者您也可以尝试 GraphicsMagick

ImageMagick is a command-line tool and the library. This library has interfaces for C++ and Perl. Or you can also try GraphicsMagick.

云之铃。 2024-08-26 19:30:40

ImageMagick 中的实用程序“convert”通常用于此目的。

http://www. cyberciti.biz/tips/howto-linux-creating-a-image-thumbnails-from-shell-prompt.html 有一个我在此处改编的示例。

给定两个目录,images/和thumbnails/,这个小脚本会将所有图像转换为另一个目录中的缩略图,并带有“thumb”。在文件名的开头:

#!/bin/bash
for i in images/*
do
echo "Prcoessing $i ..."
/usr/bin/convert -thumbnail 200 "$i" thumbnails/thumb.$(basename "$i")
done

The utility 'convert' from ImageMagick is often used for this.

http://www.cyberciti.biz/tips/howto-linux-creating-a-image-thumbnails-from-shell-prompt.html has an example that I have adapted here.

Given two directories, images/ and thumbnails/, this little script will convert all the images into thumbnails in the other directory, with 'thumb.' at the start of the filename :

#!/bin/bash
for i in images/*
do
echo "Prcoessing $i ..."
/usr/bin/convert -thumbnail 200 "$i" thumbnails/thumb.$(basename "$i")
done
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文