Skip to content

Adding .net 4.8 and .net 5 win form apps for testing.#44

Merged
SkyeHoefling merged 7 commits intomainfrom
feature/winform-app-creation
Jan 6, 2022
Merged

Adding .net 4.8 and .net 5 win form apps for testing.#44
SkyeHoefling merged 7 commits intomainfrom
feature/winform-app-creation

Conversation

@kenny-sellers
Copy link
Collaborator

@kenny-sellers kenny-sellers commented Jan 5, 2022

Fixes: #38

Description

Added two WinForms Applications for testing purposes; targeting .NET 4.8 and .NET 5.

Each of them have provide the user a dialog to select a file to process.

Merge Checklist

  • Added unit or integration tests (if not explain)
  • Benchmarks are equivalent or faster

@github-actions
Copy link

github-actions bot commented Jan 5, 2022

Benchmark Comparison

Benchmarking comparison between this Pull Request and the comitted values at benchmarks/results

thumbnail

 
Welcome to .NET 5.0!
---------------------
SDK Version: 5.0.404

Telemetry
---------
The .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

Read more about .NET CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry

----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
Learn about HTTPS: https://aka.ms/dotnet-https
----------------
Write your first app: https://aka.ms/dotnet-hello-world
Find out what's new: https://aka.ms/dotnet-whats-new
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli
--------------------------------------------------------------------------------------
summary:
worse: 4, geomean: 1.250
total diff: 4

| Slower                                                       | diff/base | Base Median (ns) | Diff Median (ns) | Modality|
| ------------------------------------------------------------ | ---------:| ----------------:| ----------------:| -------- |
| FileOnQ.Imaging.Heif.Benchmarks.Thumbnail.Thumbnail_ToStream |      1.31 |      47627000.00 |      62426750.00 |         |
| FileOnQ.Imaging.Heif.Benchmarks.Thumbnail.Thumbnail_ToArray  |      1.29 |      47949500.00 |      61713850.00 |         |
| FileOnQ.Imaging.Heif.Benchmarks.Thumbnail.Thumbnail_ToSpan   |      1.21 |      49832700.00 |      60379200.00 |         |
| FileOnQ.Imaging.Heif.Benchmarks.Thumbnail.Thumbnail_Write    |      1.19 |      52499750.00 |      62623700.00 | several?|

No Faster results for the provided threshold = 10% and noise filter = 0.3ns.

No file given
 

primary

 summary:
better: 2, geomean: 1.177
total diff: 2

No Slower results for the provided threshold = 10% and noise filter = 0.3ns.

| Faster                                                             | base/diff | Base Median (ns) | Diff Median (ns) | Modality|
| ------------------------------------------------------------------ | ---------:| ----------------:| ----------------:| --------:|
| FileOnQ.Imaging.Heif.Benchmarks.PrimaryImage.PrimaryImage_ToArray  |      1.22 |    2880173350.00 |    2357581500.00 |         |
| FileOnQ.Imaging.Heif.Benchmarks.PrimaryImage.PrimaryImage_ToStream |      1.13 |    2719733500.00 |    2398107100.00 |         |

No file given
 

Benchmark Results

thumbnail

BenchmarkDotNet=v0.13.0, OS=Windows 10.0.17763.2366 (1809/October2018Update/Redstone5)
Intel Xeon CPU E5-2673 v4 2.30GHz, 1 CPU, 2 logical and 2 physical cores
.NET SDK=5.0.404
 [Host]     : .NET 5.0.13 (5.0.1321.56516), X64 RyuJIT
 Job-JZMPNE : .NET 5.0.13 (5.0.1321.56516), X64 RyuJIT

Runtime=.NET 5.0  InvocationCount=1  LaunchCount=1  
UnrollFactor=1  
Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated Allocated native memory Native memory leak
Thumbnail_Write 62.98 ms 1.209 ms 2.150 ms - - - 288 B 5,124,881 B -
Thumbnail_ToArray 61.59 ms 1.178 ms 1.157 ms - - - 66,408 B 5,124,581 B -
Thumbnail_ToSpan 61.26 ms 1.221 ms 2.781 ms - - - 120 B 5,124,581 B -
Thumbnail_ToStream 63.17 ms 1.246 ms 2.627 ms - - - 66,472 B 5,124,581 B -

primary

BenchmarkDotNet=v0.13.0, OS=Windows 10.0.17763.2366 (1809/October2018Update/Redstone5)
Intel Xeon Platinum 8272CL CPU 2.60GHz, 1 CPU, 2 logical and 2 physical cores
.NET SDK=5.0.404
 [Host]     : .NET 5.0.13 (5.0.1321.56516), X64 RyuJIT
 Job-TQEXEA : .NET 5.0.13 (5.0.1321.56516), X64 RyuJIT

Runtime=.NET 5.0  InvocationCount=1  LaunchCount=1  
UnrollFactor=1  
Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated Allocated native memory Native memory leak
PrimaryImage_Write 2.438 s 0.0480 s 0.0624 s - - - 256 B 222,030,124 B -
PrimaryImage_ToArray 2.379 s 0.0475 s 0.1072 s - - - 1,943,008 B 222,029,232 B -
PrimaryImage_ToSpan 2.493 s 0.0498 s 0.0731 s - - - 88 B 222,029,232 B -
PrimaryImage_ToStream 2.413 s 0.0479 s 0.1061 s - - - 1,943,072 B 222,029,248 B -

Copy link
Contributor

@SkyeHoefling SkyeHoefling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution, this looks really good. There are some issues images resizing correctly on smaller devices. Can you update the winforms code to resize the jpeg to fix the window.

Here are some screenshots of using a thumbnail file vs a full file. The thumbnail file is smaller so it loads into the window with no issues:
image

When I load a larger file it is hard to tell what the image is:
image

I have
High Efficiency Images.zip
attached my sample files for you to use:

@SkyeHoefling
Copy link
Contributor

@kenny-sellers thanks for making the changes, I just pulled the sample app and things look correct with the larger heic files. See screenshot below

image

@SkyeHoefling
Copy link
Contributor

@kenny-sellers I do not see the "Build" folder in the net48 project. Did something not get pushed up or is it not working when you try and add the file as a non-compiled item? See screenshot

image

@kenny-sellers
Copy link
Collaborator Author

@ahoefling check now. VS was doing something strange!

@SkyeHoefling
Copy link
Contributor

Everything looks good, I updated the net48 project to use new style csproj. I updated the build to compile the winforms apps under x86, x64, and anycpu so we always have something that compiles.

If the build succeeds we should be ready to merge this

@kenny-sellers
Copy link
Collaborator Author

@ahoefling Looks like the build is fixed now!

@SkyeHoefling SkyeHoefling merged commit 77ad13b into main Jan 6, 2022
@SkyeHoefling SkyeHoefling deleted the feature/winform-app-creation branch January 6, 2022 19:29
@SkyeHoefling
Copy link
Contributor

Everything looks good to me, let's merge this. Thanks for the contribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create WinForms Sample App

2 participants