Fixed Build

This commit is contained in:
MaddoScientisto 2024-10-14 19:54:29 +02:00
commit 3a7a04920d
9 changed files with 97 additions and 233 deletions

View file

@ -150,23 +150,22 @@ public class ImageCreatorSharp
{
using (var img = SixLabors.ImageSharp.Image.Load(_workFile.FullName))
{
ExifReader.Orientations finalOrientation;
var rotation = img.Metadata?.ExifProfile?.GetValue(ExifTag.Orientation);
if (rotation == null)
_orientation = ExifReader.Orientations.TopLeft;
IExifValue<ushort> rotation = null;
var found = img.Metadata?.ExifProfile?.TryGetValue(ExifTag.Orientation, out rotation) ?? false;
if (found)
{
finalOrientation = ExifReader.Orientations.TopLeft;
}
else
{
finalOrientation = (ExifReader.Orientations)rotation.Value;
_orientation = (ExifReader.Orientations)rotation.ToInt32();
}
_orientation = finalOrientation;
var creation = img.Metadata?.ExifProfile?.GetValue(ExifTag.DateTime);
if (creation != null)
IExifValue<string> date = null;
var creationFound = img.Metadata?.ExifProfile?.TryGetValue(ExifTag.DateTime, out date) ?? false;
if (creationFound)
{
var succ = DateTime.TryParse(creation.Value, out var crDate);
var succ = DateTime.TryParse(date.ToString(), out var crDate);
if (succ)
{
_creationDate = crDate;

View file

@ -5,25 +5,26 @@
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\CatalogVbLib\CatalogVbLib.vbproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AsyncEnumerator" Version="4.0.2" />
<PackageReference Include="Ben.Demystifier" Version="0.3.0" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="5.0.0" />
<PackageReference Include="Ben.Demystifier" Version="0.4.1" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.3" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.5" />
<PackageReference Include="System.Buffers" Version="4.5.1" />
<PackageReference Include="System.Collections.Immutable" Version="5.0.0" />
<PackageReference Include="System.Memory" Version="4.5.4" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
<PackageReference Include="System.Collections.Immutable" Version="8.0.0" />
<PackageReference Include="System.Memory" Version="4.5.5" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageReference Include="Z.ExtensionMethods" Version="2.1.1" />
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.2.212405">
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.421302">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.Compatibility" Version="5.0.2" />
<PackageReference Include="Microsoft.Windows.Compatibility" Version="8.0.10" />
</ItemGroup>
</Project>