mirror of
https://github.com/QL-Win/QuickLook.git
synced 2026-01-28 01:08:34 +08:00
Fix tags not displayed due to empty cover art #1845
This commit is contained in:
@@ -35,6 +35,8 @@ internal static class CoverDataExtractor
|
||||
/// <returns>Byte array of the cover image, or null if extraction fails.</returns>
|
||||
public static byte[] Extract(string base64strings)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(base64strings)) return null;
|
||||
|
||||
try
|
||||
{
|
||||
var coverData = base64strings.Trim();
|
||||
@@ -68,6 +70,8 @@ internal static class CoverDataExtractor
|
||||
/// <returns><see cref="BitmapSource"/> if successful; otherwise, null.</returns>
|
||||
public static BitmapSource Extract(byte[] coverBytes)
|
||||
{
|
||||
if (coverBytes is null || coverBytes.Length is 0) return null;
|
||||
|
||||
// Supported formats: JPEG, PNG, BMP, GIF (first frame only), TIFF (first page only), ICO.
|
||||
// Not supported: WebP, HEIC/HEIF, AVIF, JPEG 2000, animated WebP/APNG, and other raw image formats (e.g., CR2, NEF).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user