Skip to content

Commit 1a7a815

Browse files
Styling
1 parent 2656529 commit 1a7a815

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

src/ImageSharp.Web/Processors/ResizeWebProcessor.cs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ private static readonly IEnumerable<string> ResizeCommands
7171
Mode,
7272
Sampler,
7373
Anchor,
74-
Compand,
74+
Color,
7575
Orient,
76-
Color
76+
Compand
7777
};
7878

7979
/// <inheritdoc/>
@@ -127,20 +127,16 @@ internal static ResizeOptions GetResizeOptions(
127127
return null;
128128
}
129129

130-
ResizeOptions options = new()
130+
return new()
131131
{
132132
Size = size,
133133
CenterCoordinates = GetCenter(orientation, commands, parser, culture),
134134
Position = GetAnchor(orientation, commands, parser, culture),
135135
Mode = GetMode(commands, parser, culture),
136136
Compand = GetCompandMode(commands, parser, culture),
137+
Sampler = GetSampler(commands),
138+
PadColor = parser.ParseValue<Color>(commands.GetValueOrDefault(Color), culture)
137139
};
138-
139-
// Defaults to Bicubic if not set.
140-
options.Sampler = GetSampler(commands);
141-
options.PadColor = parser.ParseValue<Color>(commands.GetValueOrDefault(Color), culture);
142-
143-
return options;
144140
}
145141

146142
/// <inheritdoc/>
@@ -176,7 +172,7 @@ private static Size ParseSize(
176172
return null;
177173
}
178174

179-
PointF center = new(coordinates[0], coordinates[1]);
175+
Vector2 center = new(coordinates[0], coordinates[1]);
180176
return ExifOrientationUtilities.Transform(center, Vector2.Zero, Vector2.One, orientation);
181177
}
182178

0 commit comments

Comments
 (0)