Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"cake.tool": {
"version": "3.0.0",
"commands": [
"dotnet-cake"
]
}
}
}
6 changes: 6 additions & 0 deletions Build_Windows_Package.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@echo off
cd %~dp0
call Cake_Init_Restore.cmd
dotnet tool run dotnet-cake build.cake --configuration=release --framework=net7.0-windows --runtime=win-x64 --target=ziprelease
echo.
pause
6 changes: 6 additions & 0 deletions Build_Windows_Release.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@echo off
cd %~dp0
call Cake_Init_Restore.cmd
dotnet tool run dotnet-cake build.cake --configuration=release --framework=net7.0-windows --runtime=win-x64 --target=build
echo.
pause
23 changes: 23 additions & 0 deletions Cake_Init_Restore.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@echo off
cd %~dp0
echo ========================================
echo .net Info
echo ========================================
echo.
dotnet --info
echo.
if exist ".config/dotnet-tools.json" (
echo ========================================
echo Cake Restore
echo ========================================
echo.
dotnet tool restore
) else (
echo ========================================
echo Cake Install
echo ========================================
echo.
dotnet new tool-manifest
dotnet tool install Cake.Tool --version 3.0.0
echo.
)
26 changes: 23 additions & 3 deletions Feuster.Imaging.Resizing.Lib/Feuster.Imaging.Resizing.Lib.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Drawing;
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.Reflection;
using System.Runtime.InteropServices;
Expand All @@ -7,8 +8,27 @@ namespace Feuster.Imaging.Resizing
{
public class Scaler
{
//Version string
public static string Version = Assembly.GetEntryAssembly().GetName().Version.Major.ToString() + "." + Assembly.GetEntryAssembly().GetName().Version.Minor.ToString() + "." + Assembly.GetEntryAssembly().GetName().Version.Revision.ToString() + "." + Assembly.GetEntryAssembly().GetName().Version.Build.ToString();
//GitVersion will be only be actualized/overwritten when using Cake build of ResizeX!
public const string GitVersion = "git-2273bbc";

//Version string will be only be actualized/overwritten when using Cake build of ResizeX as fallback Assembly is read out but this works not if lib is compiled into exe!
public static string Version = "1.0.1.0";

/// <summary>
/// Call to library version
/// </summary>
/// <returns>Version string</returns>
internal static string GetVersion()
{
if (Version == string.Empty)
Version = Assembly.GetEntryAssembly().GetName().Version.Major.ToString() + "." + Assembly.GetEntryAssembly().GetName().Version.Minor.ToString() + "." + Assembly.GetEntryAssembly().GetName().Version.Revision.ToString() + "." + Assembly.GetEntryAssembly().GetName().Version.Build.ToString();
if (GitVersion != string.Empty)
return $"{Version}-{GitVersion}";
else
return Version;
}
public static string LibVersion => GetVersion();


//List of the available Scaler algorithm groups
public enum ScalerGroups
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<TargetFrameworks>net6.0-windows;net7.0-windows</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PlatformTarget>x64</PlatformTarget>
Expand All @@ -14,6 +14,11 @@
<PackageProjectUrl>https://github.com/feuster/ResizeX</PackageProjectUrl>
<PackageLicenseFile>gpl-2.0.txt</PackageLicenseFile>
<PackageRequireLicenseAcceptance>False</PackageRequireLicenseAcceptance>
<AssemblyVersion>1.0.1.0</AssemblyVersion>
<FileVersion>$(AssemblyVersion)</FileVersion>
<Version>$(AssemblyVersion)</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageOutputPath>./../nuget</PackageOutputPath>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_LastSelectedProfileId>C:\Git\ResizeX\Feuster.Imaging.Resizing.Lib\Properties\PublishProfiles\FolderProfile.pubxml</_LastSelectedProfileId>
<ActiveDebugFramework>net7.0-windows</ActiveDebugFramework>
</PropertyGroup>
</Project>
Binary file removed Nuget/Feuster.Imaging.Resizing.Lib.1.0.0.nupkg
Binary file not shown.
75 changes: 0 additions & 75 deletions Nuget/Feuster.Imaging.Resizing.Lib.deps.json

This file was deleted.

Binary file removed Nuget/Feuster.Imaging.Resizing.Lib.dll
Binary file not shown.
Binary file removed Nuget/Microsoft.Win32.SystemEvents.dll
Binary file not shown.
Binary file removed Nuget/System.Drawing.Common.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ _Remark:_ some image/scaler combinations may produce errors when images get to b

All the image resizing functions are bundled in the _Feuster.Imaging.Resizing.Lib_

A Nuget package can be found in the project folder _Nuget_.
The library and a nuget package are available in the library release bundle.

## Performance Test

Expand Down
Binary file removed Release/ResizeX.exe
Binary file not shown.
Binary file removed Release/ResizeX_win-x64_1.0.0.0.zip
Binary file not shown.
Loading