Implement ImageCreatorImageSharp using SixLabors.ImageSharp for image processing
- Added ImageCreatorImageSharp class for image creation, handling EXIF orientation, resizing, and saving images. - Replaced GDI+ dependencies with ImageSharp for cross-platform compatibility. - Introduced methods for drawing text and logos on images, including handling transparency and positioning. - Created a test plan for validating ImageCreatorImageSharp functionality, focusing on image resizing, text positioning, logo features, and EXIF orientation. - Added documentation for the test plan outlining goals, project structure, and implementation notes.
This commit is contained in:
parent
90fb03bf0c
commit
d62342aae1
11 changed files with 455 additions and 74 deletions
33
MaddoShared.ImageSharpTests/Helpers/TempWorkspace.cs
Normal file
33
MaddoShared.ImageSharpTests/Helpers/TempWorkspace.cs
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace MaddoShared.ImageSharpTests.Helpers
|
||||
{
|
||||
public sealed class TempWorkspace : IDisposable
|
||||
{
|
||||
public DirectoryInfo Root { get; }
|
||||
public DirectoryInfo SourceDir { get; }
|
||||
public DirectoryInfo DestDir { get; }
|
||||
|
||||
public TempWorkspace()
|
||||
{
|
||||
var root = Path.Combine(Path.GetTempPath(), "MaddoShared.ImageSharpTests", Guid.NewGuid().ToString("N"));
|
||||
Root = Directory.CreateDirectory(root);
|
||||
SourceDir = Directory.CreateDirectory(Path.Combine(Root.FullName, "Source"));
|
||||
DestDir = Directory.CreateDirectory(Path.Combine(Root.FullName, "Dest"));
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Root.Exists)
|
||||
Root.Delete(true);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// best-effort cleanup
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue