Browse Source

Update src/ImageSharp/Processing/Processors/Transforms/Resize/ResizeProcessor{TPixel}.cs

pull/1773/head
James Jackson-South 5 years ago
committed by GitHub
parent
commit
4323c8d175
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/ImageSharp/Processing/Processors/Transforms/Resize/ResizeProcessor{TPixel}.cs

2
src/ImageSharp/Processing/Processors/Transforms/Resize/ResizeProcessor{TPixel}.cs

@ -188,7 +188,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms
bool compand, bool compand,
bool premultiplyAlpha) bool premultiplyAlpha)
{ {
PixelAlphaRepresentation? alphaRepresentation = PixelOperations<TPixel>.Instance.GetPixelTypeInfo()?.PixelAlphaRepresentation; PixelAlphaRepresentation? alphaRepresentation = PixelOperations<TPixel>.Instance.GetPixelTypeInfo()?.AlphaRepresentation;
// Premultiply only if alpha representation is unknown or Unassociated: // Premultiply only if alpha representation is unknown or Unassociated:
bool needsPremultiplication = alphaRepresentation == null || alphaRepresentation.Value == PixelAlphaRepresentation.Unassociated; bool needsPremultiplication = alphaRepresentation == null || alphaRepresentation.Value == PixelAlphaRepresentation.Unassociated;

Loading…
Cancel
Save