Skip to content

Commit 22e193b

Browse files
Merge pull request #90 from meixger/master
AnchorPositionMode.Center is ignored when CenterCoordinates is Empty
2 parents dc45b69 + cec0707 commit 22e193b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ImageSharp.Web/Processors/ResizeWebProcessor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,13 @@ private static Size ParseSize(IDictionary<string, string> commands, CommandParse
116116
return new Size((int)width, (int)height);
117117
}
118118

119-
private static PointF GetCenter(IDictionary<string, string> commands, CommandParser parser)
119+
private static PointF? GetCenter(IDictionary<string, string> commands, CommandParser parser)
120120
{
121121
float[] coordinates = parser.ParseValue<float[]>(commands.GetValueOrDefault(Xy));
122122

123123
if (coordinates.Length != 2)
124124
{
125-
return PointF.Empty;
125+
return null;
126126
}
127127

128128
return new PointF(coordinates[0], coordinates[1]);

0 commit comments

Comments
 (0)