[PR #2676] [MERGED] Implement Blurhash generation for images #9191

Closed
opened 2026-02-07 05:57:48 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/2676
Author: @GranPC
Created: 3/26/2020
Status: Merged
Merged: 6/2/2020
Merged by: @JustAMan

Base: masterHead: public-pr/blurhash


📝 Commits (10+)

  • b9fc0d2 Add BlurHash support to backend
  • fe480ca Add endpoint to update all items in library
  • 02da312 Fix compilation after rebase
  • bfb644d Fix nullref exception
  • f18293b Switch to BlurHashSharp lib which should be faster
  • a226a4e Compute hash only when one is not computed in DB, small optimizations here and there
  • 186b7f3 More small optimizations
  • 2b1ae7a Fix code smells
  • 3fb4c13 Make blurhash be computed during regular scans if it was not already computed
  • 8b517e9 Fix nullref for imageProcessor in LibraryManager

📊 Changes

17 files changed (+339 additions, -38 deletions)

View changed files

📝 .vscode/tasks.json (+11 -1)
📝 Emby.Drawing/ImageProcessor.cs (+21 -0)
📝 Emby.Drawing/NullImageEncoder.cs (+6 -0)
📝 Emby.Server.Implementations/Data/SqliteItemRepository.cs (+17 -12)
📝 Emby.Server.Implementations/Dto/DtoService.cs (+79 -15)
📝 Emby.Server.Implementations/Library/LibraryManager.cs (+89 -4)
📝 Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj (+2 -0)
📝 Jellyfin.Drawing.Skia/SkiaEncoder.cs (+15 -0)
📝 MediaBrowser.Api/Images/ImageService.cs (+14 -5)
📝 MediaBrowser.Controller/Drawing/IImageEncoder.cs (+9 -0)
📝 MediaBrowser.Controller/Drawing/IImageProcessor.cs (+8 -0)
📝 MediaBrowser.Controller/Entities/BaseItem.cs (+42 -0)
📝 MediaBrowser.Controller/Entities/Folder.cs (+5 -0)
📝 MediaBrowser.Controller/Entities/ItemImageInfo.cs (+6 -0)
📝 MediaBrowser.Controller/Library/ILibraryManager.cs (+2 -1)
📝 MediaBrowser.Model/Dto/BaseItemDto.cs (+7 -0)
📝 MediaBrowser.Model/Dto/ImageInfo.cs (+6 -0)

📄 Description

Changes
This PR adds preliminary support for generating blurhash thumbnails on the backend. I'm not done with it though, and there are a couple of things I'd like to get some feedback on.

Issues

Provides backend for #2569


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/2676 **Author:** [@GranPC](https://github.com/GranPC) **Created:** 3/26/2020 **Status:** ✅ Merged **Merged:** 6/2/2020 **Merged by:** [@JustAMan](https://github.com/JustAMan) **Base:** `master` ← **Head:** `public-pr/blurhash` --- ### 📝 Commits (10+) - [`b9fc0d2`](https://github.com/jellyfin/jellyfin/commit/b9fc0d26287e46017515e4ac3e569ca2c60f622f) Add BlurHash support to backend - [`fe480ca`](https://github.com/jellyfin/jellyfin/commit/fe480caf5486a21d7ef152009e5c3e08364e0f33) Add endpoint to update all items in library - [`02da312`](https://github.com/jellyfin/jellyfin/commit/02da312f8aaf9975f31291fd65687f637e38530c) Fix compilation after rebase - [`bfb644d`](https://github.com/jellyfin/jellyfin/commit/bfb644d5f50fff9fd8ba5fe4504c73ec5be851af) Fix nullref exception - [`f18293b`](https://github.com/jellyfin/jellyfin/commit/f18293bf762c86581153ab8d9b1b6267421178a9) Switch to BlurHashSharp lib which should be faster - [`a226a4e`](https://github.com/jellyfin/jellyfin/commit/a226a4ee03d974615a6fa26b936a93458a255b70) Compute hash only when one is not computed in DB, small optimizations here and there - [`186b7f3`](https://github.com/jellyfin/jellyfin/commit/186b7f303cd6f95ca64e020c2838dfe2028ea54c) More small optimizations - [`2b1ae7a`](https://github.com/jellyfin/jellyfin/commit/2b1ae7ac5834054866aa485b18f85f1793f7b8b4) Fix code smells - [`3fb4c13`](https://github.com/jellyfin/jellyfin/commit/3fb4c1356c22c8be03855a161140c21eb395086b) Make blurhash be computed during regular scans if it was not already computed - [`8b517e9`](https://github.com/jellyfin/jellyfin/commit/8b517e9beffd5cf7b1e7ed2b82b0bdf63fe60f03) Fix nullref for imageProcessor in LibraryManager ### 📊 Changes **17 files changed** (+339 additions, -38 deletions) <details> <summary>View changed files</summary> 📝 `.vscode/tasks.json` (+11 -1) 📝 `Emby.Drawing/ImageProcessor.cs` (+21 -0) 📝 `Emby.Drawing/NullImageEncoder.cs` (+6 -0) 📝 `Emby.Server.Implementations/Data/SqliteItemRepository.cs` (+17 -12) 📝 `Emby.Server.Implementations/Dto/DtoService.cs` (+79 -15) 📝 `Emby.Server.Implementations/Library/LibraryManager.cs` (+89 -4) 📝 `Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj` (+2 -0) 📝 `Jellyfin.Drawing.Skia/SkiaEncoder.cs` (+15 -0) 📝 `MediaBrowser.Api/Images/ImageService.cs` (+14 -5) 📝 `MediaBrowser.Controller/Drawing/IImageEncoder.cs` (+9 -0) 📝 `MediaBrowser.Controller/Drawing/IImageProcessor.cs` (+8 -0) 📝 `MediaBrowser.Controller/Entities/BaseItem.cs` (+42 -0) 📝 `MediaBrowser.Controller/Entities/Folder.cs` (+5 -0) 📝 `MediaBrowser.Controller/Entities/ItemImageInfo.cs` (+6 -0) 📝 `MediaBrowser.Controller/Library/ILibraryManager.cs` (+2 -1) 📝 `MediaBrowser.Model/Dto/BaseItemDto.cs` (+7 -0) 📝 `MediaBrowser.Model/Dto/ImageInfo.cs` (+6 -0) </details> ### 📄 Description <!-- Ensure your title is short, descriptive, and in the imperative mood (Fix X, Change Y, instead of Fixed X, Changed Y). For a good inspiration of what to write in commit messages and PRs please review https://chris.beams.io/posts/git-commit/ and our documentation. --> **Changes** This PR adds preliminary support for generating blurhash thumbnails on the backend. I'm not done with it though, and there are a couple of things I'd like to get some feedback on. **Issues** <!-- Tag any issues that this PR solves here. ex. Fixes # --> Provides backend for #2569 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 05:57:48 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#9191