This commit is contained in:
TheXamlGuy
2024-07-17 21:43:58 +01:00
parent efd00ff81a
commit 93c7a43ab4
75 changed files with 231 additions and 183 deletions
+5 -5
View File
@@ -3,15 +3,15 @@ using Toolkit.Foundation;
namespace Toolkit.Avalonia;
public class ImageReader(IImageResizer imageResizer) :
public class ImageReader(IImageResizer imageResizer) :
IImageReader
{
public IImageDescriptor Get(Stream stream,
int width,
int height,
public IImageDescriptor Get(Stream stream,
int width,
int height,
bool maintainAspectRatio)
{
Bitmap resizedImage = imageResizer.Resize(stream, width, height, maintainAspectRatio);
return new ImageDescriptor(resizedImage, width, height);
}
}
}