You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified that I am running the latest version of ImageSharp.Drawing
I have verified if the problem exist in both DEBUG and RELEASE mode
I have searched open and closed issues to ensure it has not already been reported
Description
When using the DrawImage method to draw an image outside of the original image's bounds (i.e., where the two images do not overlap), an ImageProcessingException is thrown, with message Cannot draw image because the source image does not overlap the target image.. I would have expected the method to silently do nothing, instead.
Steps to Reproduce
usingSixLabors.ImageSharp;usingSixLabors.ImageSharp.Processing;ImagesmallerImage=Image.Load(@"C:\Users\Giorgio\Downloads\test50x50.jpg");// A 50x50 pixel imageImageimage=newImage<SixLabors.ImageSharp.PixelFormats.Rgba32>(100,100);// A new 100x100 image on which to draw.// These work:image.Mutate(x =>x.DrawImage(smallerImage,newPoint(10,10),newGraphicsOptions()));image.Mutate(x =>x.DrawImage(smallerImage,newPoint(-20,-20),newGraphicsOptions()));image.Mutate(x =>x.DrawImage(smallerImage,newPoint(80,80),newGraphicsOptions()));// These throw the exception:image.Mutate(x =>x.DrawImage(smallerImage,newPoint(110,110),newGraphicsOptions()));image.Mutate(x =>x.DrawImage(smallerImage,newPoint(-60,-60),newGraphicsOptions()));
System Configuration
ImageSharp.Drawing version: tried with 1.0.0-beta14 and 1.0.0-beta14.10
Other ImageSharp packages and versions: tried with ImageSharp 2.0.0 and 3.0.0-alpha.0.11
Environment (Operating system, version and so on): Windows 10
.NET Framework version: .NET 6
Additional information: N/A
The text was updated successfully, but these errors were encountered:
Prerequisites
DEBUG
andRELEASE
modeDescription
When using the
DrawImage
method to draw an image outside of the original image's bounds (i.e., where the two images do not overlap), anImageProcessingException
is thrown, with messageCannot draw image because the source image does not overlap the target image.
. I would have expected the method to silently do nothing, instead.Steps to Reproduce
System Configuration
The text was updated successfully, but these errors were encountered: