Skip to content

Commit 338e5f4

Browse files
Merge remote-tracking branch 'upstream/js/imagesharpV3' into stefannikolei/nullable/remove_nullable-disable
2 parents 5b6086d + cd276a3 commit 338e5f4

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/ImageSharp.Web/Processors/ResizeWebProcessor.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,18 @@ public FormattedImage Process(
125125
return null;
126126
}
127127

128+
ResizeMode mode = GetMode(commands, parser, culture);
129+
128130
return new()
129131
{
130132
Size = size,
131133
CenterCoordinates = GetCenter(orientation, commands, parser, culture),
132134
Position = GetAnchor(orientation, commands, parser, culture),
133-
Mode = GetMode(commands, parser, culture),
135+
Mode = mode,
134136
Compand = GetCompandMode(commands, parser, culture),
135137
Sampler = GetSampler(commands),
136-
PadColor = parser.ParseValue<Color>(commands.GetValueOrDefault(Color), culture)
138+
PadColor = parser.ParseValue<Color>(commands.GetValueOrDefault(Color), culture),
139+
TargetRectangle = mode is ResizeMode.Manual ? new Rectangle(0, 0, size.Width, size.Height) : null
137140
};
138141
}
139142

0 commit comments

Comments
 (0)