Thumbnails: Difference between revisions
f3d can create thumbnails for 3D model files |
Added a header so the newer image format section is more visible |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 47: | Line 47: | ||
Thumbnails for the following MimeTypes are enabled: ''image/png; image/jpeg; image/bmp; image/x-bmp; image/x-MS-bmp; image/gif; image/x-icon; image/x-ico; image/x-win-bitmap; image/vnd.microsoft.icon; application/ico; image/ico; image/icon; text/ico; image/x-portable-anymap; image/x-portable-bitmap; image/x-portable-graymap; image/x-portable-pixmap; image/tiff; image/x-xpixmap; image/x-xbitmap; image/x-tga; image/x-icns; image/x-quicktime; image/qtif.'' | Thumbnails for the following MimeTypes are enabled: ''image/png; image/jpeg; image/bmp; image/x-bmp; image/x-MS-bmp; image/gif; image/x-icon; image/x-ico; image/x-win-bitmap; image/vnd.microsoft.icon; application/ico; image/ico; image/icon; text/ico; image/x-portable-anymap; image/x-portable-bitmap; image/x-portable-graymap; image/x-portable-pixmap; image/tiff; image/x-xpixmap; image/x-xbitmap; image/x-tga; image/x-icns; image/x-quicktime; image/qtif.'' | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"># configuration.nix | ||
# configuration.nix | |||
{ pkgs, ... }: | { pkgs, ... }: | ||
| Line 59: | Line 58: | ||
}</syntaxhighlight> | }</syntaxhighlight> | ||
=== | ==== Thumbnails for newer image formats such as AVIF and JPEG XL ==== | ||
For newer image formats not included in <code>gdk-pixbuf</code> you can enable thumbnails by adding their specific image libraries into the system packages as seen below<syntaxhighlight lang="nix"># configuration.nix | |||
# configuration.nix | |||
{ pkgs, ... }: | { pkgs, ... }: | ||
{ | { | ||
environment.systemPackages = [ | environment.systemPackages = [ | ||
pkgs. | # For general HEIF container support (this includes the AVIF file format) | ||
pkgs.libheif.bin # provides heif-thumbnailer (the program that generates HEIF thumbnails) | |||
pkgs.libheif.out # provides heif.thumbnailer (allows for the viewing of HEIF thumbnails) | |||
# For more newer AVIF specific support usually not needed if libheif is installed | |||
pkgs.libavif | |||
# For JXL(JPEG XL) support | |||
pkgs.libjxl | |||
# For WebP support | |||
pkgs.webp-pixbuf-loader | |||
]; | ]; | ||
} | # All of the thumbnailers are created in '/run/current-system/sw/share/thumbnailers' | ||
</syntaxhighlight> | }</syntaxhighlight> | ||
=== Enable | === Enable 3D Model Thumbnails === | ||
Thumbnails for various 3D model files can be enabled by installing f3d:<syntaxhighlight lang="nix"> | |||
Thumbnails for | |||
<syntaxhighlight lang="nix"> | |||
# configuration.nix | # configuration.nix | ||
{ pkgs, ... }: | { pkgs, ... }: | ||
| Line 82: | Line 87: | ||
{ | { | ||
environment.systemPackages = [ | environment.systemPackages = [ | ||
pkgs. | pkgs.f3d | ||
]; | ]; | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||