From fd9471e25cb317239b4de226d28faf6ea712d262 Mon Sep 17 00:00:00 2001 From: "J. Zebedee" Date: Mon, 1 May 2023 02:13:25 -0500 Subject: [PATCH 1/6] Use hex strings in test thumbhashes --- test/ThumbHash.Tests/ThumbHashTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/ThumbHash.Tests/ThumbHashTests.cs b/test/ThumbHash.Tests/ThumbHashTests.cs index 35d3158..73f23a0 100644 --- a/test/ThumbHash.Tests/ThumbHashTests.cs +++ b/test/ThumbHash.Tests/ThumbHashTests.cs @@ -6,7 +6,7 @@ public class ThumbHashTests { private static SKBitmap FlowerBitmap => GetBitmap("Resources/flower.jpg"); - private static byte[] FlowerThumbHash => new byte[] { 147, 74, 6, 45, 6, 146, 86, 195, 116, 5, 88, 103, 218, 138, 182, 103, 148, 144, 81, 7, 25 }; + private static byte[] FlowerThumbHash => Convert.FromHexString("934A062D069256C374055867DA8AB6679490510719"); private static (float r, float g, float b, float a) FlowerThumbHashAverages => (r: 0.484127015f, g: 0.341269821f, b: 0.0793650597f, a: 1f); @@ -16,7 +16,7 @@ public class ThumbHashTests private static SKBitmap TuxBitmap => GetBitmap("Resources/tux.png", fixPremul: true); - private static byte[] TuxThumbHash => Convert.FromHexString("A1 19 8A 1C 02 38 3A 25 D7 27 F6 8B 97 1F F7 F9 71 7F 80 37 67 58 98 79 06".Replace(" ", "")); + private static byte[] TuxThumbHash => Convert.FromHexString("A1198A1C02383A25D727F68B971FF7F9717F80376758987906"); private static (float r, float g, float b, float a) TuxThumbHashAverages => (r: 0.616402208f, g: 0.568783104f, b: 0.386243373f, a: 0.533333361f); From ef2951c9d316b18f085a97de1dd5d63df0772ab8 Mon Sep 17 00:00:00 2001 From: "J. Zebedee" Date: Sun, 7 May 2023 18:13:21 -0500 Subject: [PATCH 2/6] Add link to repository in README header --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 55cc21f..8a2391c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ThumbHash +# [ThumbHash](https://github.com/jzebedee/ThumbHash) [![ThumbHash nuget package](https://img.shields.io/nuget/v/ThumbHash.svg?style=flat)](https://www.nuget.org/packages/ThumbHash) [![CI build-test-pack](https://github.com/jzebedee/ThumbHash/actions/workflows/ci.yml/badge.svg)](https://github.com/jzebedee/ThumbHash/actions/workflows/ci.yml) From b105cad2a5be6d91b5c4eef5cf1a830d519e4f5f Mon Sep 17 00:00:00 2001 From: "J. Zebedee" Date: Sun, 7 May 2023 18:17:01 -0500 Subject: [PATCH 3/6] Make image links absolute (for nuget.org README) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8a2391c..664ea63 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,8 @@ A very compact representation of a placeholder for an image. Store it inline wit |Image|ThumbHash|ThumbHash Image| |-----|---------|---------------| -|![Flower](assets/flower.jpg)|93 4A 06 2D 06 92 56 C3 74 05 58 67 DA 8A B6 67 94 90 51 07 19|Flower ThumbHash| -|![Tux](assets/tux.png)|A1 19 8A 1C 02 38 3A 25 D7 27 F6 8B 97 1F F7 F9 71 7F 80 37 67 58 98 79 06|Tux ThumbHash| +|![Flower](https://github.com/jzebedee/ThumbHash/blob/master/assets/flower.jpg?raw=1)|93 4A 06 2D 06 92 56 C3 74 05 58 67 DA 8A B6 67 94 90 51 07 19|Flower ThumbHash| +|![Tux](https://github.com/jzebedee/ThumbHash/blob/master/assets/tux.png?raw=1)|A1 19 8A 1C 02 38 3A 25 D7 27 F6 8B 97 1F F7 F9 71 7F 80 37 67 58 98 79 06|Tux ThumbHash| [See a demo of ThumbHash in action _here_](https://evanw.github.io/thumbhash/). From ae456cd333c4e2736af47a2819a59586cfcb2452 Mon Sep 17 00:00:00 2001 From: "J. Zebedee" Date: Thu, 21 Sep 2023 12:57:33 -0500 Subject: [PATCH 4/6] Bump dep package versions --- bench/ThumbHash.Benchmarks.csproj | 6 +++--- test/ThumbHash.Tests/ThumbHash.Tests.csproj | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/bench/ThumbHash.Benchmarks.csproj b/bench/ThumbHash.Benchmarks.csproj index d237fd4..03974ea 100644 --- a/bench/ThumbHash.Benchmarks.csproj +++ b/bench/ThumbHash.Benchmarks.csproj @@ -12,9 +12,9 @@ - - - + + + diff --git a/test/ThumbHash.Tests/ThumbHash.Tests.csproj b/test/ThumbHash.Tests/ThumbHash.Tests.csproj index f954e64..08caab0 100644 --- a/test/ThumbHash.Tests/ThumbHash.Tests.csproj +++ b/test/ThumbHash.Tests/ThumbHash.Tests.csproj @@ -25,14 +25,14 @@ - - - - - - - - + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all From e2437b3d368c31224d3041f2ad3b6a44d5c950b7 Mon Sep 17 00:00:00 2001 From: "J. Zebedee" Date: Thu, 21 Sep 2023 12:58:09 -0500 Subject: [PATCH 5/6] Conditionally enable IsTrimmable to avoid net8 SDK warning --- src/ThumbHash/ThumbHash.csproj | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ThumbHash/ThumbHash.csproj b/src/ThumbHash/ThumbHash.csproj index 3ce82e4..37a1816 100644 --- a/src/ThumbHash/ThumbHash.csproj +++ b/src/ThumbHash/ThumbHash.csproj @@ -5,7 +5,6 @@ enable latest enable - true ThumbHashes ThumbHash @@ -24,6 +23,13 @@ snupkg + + + + + true + + true From e472b6042642742e618938beb19be500bf6146da Mon Sep 17 00:00:00 2001 From: "J. Zebedee" Date: Thu, 21 Sep 2023 12:59:33 -0500 Subject: [PATCH 6/6] Bump version to 2.1.1 --- src/ThumbHash/ThumbHash.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ThumbHash/ThumbHash.csproj b/src/ThumbHash/ThumbHash.csproj index 37a1816..d0c2e93 100644 --- a/src/ThumbHash/ThumbHash.csproj +++ b/src/ThumbHash/ThumbHash.csproj @@ -9,7 +9,7 @@ ThumbHash jzebedee - 2.1 + 2.1.1 A very compact representation of a placeholder for an image. Store it inline with your data and show it while the real image is loading for a smoother loading experience. https://github.com/jzebedee/ThumbHash MIT