This commit is contained in:
2026-03-23 17:22:47 +01:00
parent 7ffeeb464a
commit c6c5515ebd
7 changed files with 23 additions and 17 deletions
+3 -1
View File
@@ -17,6 +17,7 @@ namespace Musify.Infrastructure.Pictures
{
try
{
logger.LogDebug("Resizing picture to {Width}x{Height}", width, height);
if (pictureStream.CanSeek && pictureStream.Position > 0)
pictureStream.Position = 0;
@@ -34,11 +35,12 @@ namespace Musify.Infrastructure.Pictures
memoryStream.Position = 0;
logger.LogDebug("Picture resized successfully. OutputLength: {Length}", memoryStream.Length);
return Result<Stream>.Success(memoryStream);
}
catch (Exception exception)
{
logger.LogError(exception, "An error occurred while resizing the picture.");
logger.LogError(exception, "An error occurred while resizing the picture to {Width}x{Height}.", width, height);
return Result.Error("An error occurred while resizing the picture.");
}
}