Prerequisites
Description
A NullReferenceException is thrown when trying to reuse an ImageBrush<T>. Looks like the source image is being disposed during the first Fill(...) call.
Steps to Reproduce
using (var src = new Image<Rgba32>(5, 5))
{
var brush = new ImageBrush<Rgba32>(src);
using (var dest = new Image<Rgba32>(10, 10))
{
dest.Mutate(c => c.Fill(brush, new Rectangle(0, 0, 10, 10)));
dest.Mutate(c => c.Fill(brush, new Rectangle(0, 0, 10, 10)));
}
}
System Configuration
- ImageSharp version: current main
- Other ImageSharp packages and versions: n.a.
- Environment (Operating system, version and so on): Any
- .NET Framework version: Any
- Additional information: -
Prerequisites
DEBUGandRELEASEmodeDescription
A
NullReferenceExceptionis thrown when trying to reuse anImageBrush<T>. Looks like the source image is being disposed during the firstFill(...)call.Steps to Reproduce
System Configuration