Browse Source

Merge branch 'master' of github.com:Squidex/squidex

# Conflicts:
#	backend/src/Squidex.Infrastructure/Assets/ImageSharp/ImageSharpAssetThumbnailGenerator.cs
#	backend/src/Squidex/Areas/Api/Controllers/Assets/Models/AssetContentQueryDto.cs
pull/590/head
Sebastian 5 years ago
parent
commit
2db9851f22
  1. 6
      backend/src/Squidex.Infrastructure/Assets/ImageSharp/ImageSharpAssetThumbnailGenerator.cs
  2. 2
      backend/src/Squidex/Areas/Api/Controllers/Assets/Models/AssetContentQueryDto.cs

6
backend/src/Squidex.Infrastructure/Assets/ImageSharp/ImageSharpAssetThumbnailGenerator.cs

@ -34,7 +34,7 @@ namespace Squidex.Infrastructure.Assets.ImageSharp
if (!options.IsValid)
{
await source.CopyToAsync(destination);
source.CopyTo(destination);
return;
}
@ -84,7 +84,7 @@ namespace Squidex.Infrastructure.Assets.ImageSharp
image.Mutate(x => x.Resize(resizeOptions));
}
await image.SaveAsync(destination, encoder);
image.Save(destination, encoder);
}
}
finally
@ -93,7 +93,7 @@ namespace Squidex.Infrastructure.Assets.ImageSharp
}
}
private static IImageEncoder GetEncoder(ResizeOptions options, IImageFormat? format)
private static IImageEncoder GetEncoder(ResizeOptions options, SixLabors.ImageSharp.Formats.IImageFormat? format)
{
var encoder = Configuration.Default.ImageFormatsManager.FindEncoder(format);

2
backend/src/Squidex/Areas/Api/Controllers/Assets/Models/AssetContentQueryDto.cs

@ -88,7 +88,7 @@ namespace Squidex.Areas.Api.Controllers.Assets.Models
public bool ForceResize { get; set; }
/// <summary>
/// The target image format.
/// True to force a new resize even if it already stored.
/// </summary>
[FromQuery(Name = "format")]
public ImageFormat Format { get; set; }

Loading…
Cancel
Save