Skip to content

Commit b78e31f

Browse files
Rename extension for consistancy
1 parent 5ecbcc0 commit b78e31f

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/ImageSharp.Web/Middleware/ImageSharpMiddleware.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ private async Task ProcessRequestAsync(
345345
// The non-generic variant will decode to the correct pixel format based upon the encoded image metadata which can yield
346346
// massive memory savings.
347347
IReadOnlyList<(int Index, IImageWebProcessor Processor)> sortedProcessors = this.processors.OrderBySupportedCommands(commands);
348-
bool requiresAlpha = sortedProcessors.RequiresAlphaComponent(commands, this.commandParser, this.parserCulture);
348+
bool requiresAlpha = sortedProcessors.RequiresAlphaAwarePixelFormat(commands, this.commandParser, this.parserCulture);
349349

350350
if (requiresAlpha)
351351
{

src/ImageSharp.Web/Processors/WebProcessingExtensions.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,11 @@ public static bool IsSupportedCommand(this IImageWebProcessor processor, string
8989
}
9090

9191
/// <summary>
92+
/// <para>
9293
/// Returns a value indicating whether the image to be processed should be decoded using a pixel format that supports
9394
/// an alpha component for correct processing.
95+
/// </para>
96+
/// <para>This method is used to determine whether optimizations can be enabled to reduce memory consumption during processing.</para>
9497
/// </summary>
9598
/// <param name="processors">The collection of ordered processors.</param>
9699
/// <param name="commands">The ordered collection containing the processing commands.</param>
@@ -99,7 +102,7 @@ public static bool IsSupportedCommand(this IImageWebProcessor processor, string
99102
/// The <see cref="CultureInfo"/> to use as the current parsing culture.
100103
/// </param>
101104
/// <returns>The <see cref="bool"/> indicating whether an alpha component is required.</returns>
102-
public static bool RequiresAlphaComponent(
105+
public static bool RequiresAlphaAwarePixelFormat(
103106
this IReadOnlyList<(int Index, IImageWebProcessor Processor)> processors,
104107
CommandCollection commands,
105108
CommandParser parser,

0 commit comments

Comments
 (0)