Thumbnails: Difference between revisions

f3d can create thumbnails for 3D model files
Merged together the HEIF/AVIF section into the image section and also listed more image libraries which aren't inside of gdk-pixbuf
Line 57: Line 57:


   # 'gdk-pixbuf-thumbnailer.thumbnailer' is created in '/run/current-system/sw/share/thumbnailers'
   # 'gdk-pixbuf-thumbnailer.thumbnailer' is created in '/run/current-system/sw/share/thumbnailers'
}</syntaxhighlight>
}</syntaxhighlight>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
 
=== Enable 3D Model Thumbnails ===
Thumbnails for various 3D model files can be enabled by installing f3d:<syntaxhighlight lang="nix">
# configuration.nix
{ pkgs, ... }:
{ pkgs, ... }:


{
{
   environment.systemPackages = [  
   environment.systemPackages = [  
     pkgs.f3d
    # For general AVIF and HEIF support
     pkgs.libheif
 
    # For more newer AVIF specific support
    pkgs.libavif
   
    # For JXL(JPEG XL) support
    pkgs.libjxl
   
    # For WebP support
    pkgs.webp-pixbuf-loader
   ];
   ];
}
}</syntaxhighlight>
</syntaxhighlight>


=== Enable HEIF Image Thumbnails ===
=== Enable 3D Model Thumbnails ===
To enable thumbnails for HEIF image format use <code>libheif</code> to decode HEIF images and <code>libheif.out</code> to generate thumbnails.
Thumbnails for various 3D model files can be enabled by installing f3d:<syntaxhighlight lang="nix">
 
Thumbnails for the following MimeTypes are enabled: ''image/heif; image/avif.''
 
<syntaxhighlight lang="nix">
# configuration.nix
# configuration.nix
{ pkgs, ... }:
{ pkgs, ... }:
Line 82: Line 83:
{
{
   environment.systemPackages = [  
   environment.systemPackages = [  
     pkgs.libheif
     pkgs.f3d
    pkgs.libheif.out
   ];
   ];
  # 'heif.thumbnailer' is created in '/run/current-system/sw/share/thumbnailers'
}
}
</syntaxhighlight>
</syntaxhighlight>