Closed x3x4x5 closed 2 years ago
If the ImageBrush is orientated landscape, (e.g. width =125, height =90) you will get the exception _"Specified argument was out of the range of valid values. (Parameter 'DangerousGetRowSpan(99). Y was out of range. Height=90')".
Applying the change suggested above fixes also this issue.
Thanks @x3x4x5 for providing so much information and also the suggested fix!
@MarkusGrafBuildDesk I can confirm that the PR #223 containing the fix works for your provided dimensions in both landscape and portrait. Thanks for the additional information.
Prerequisites
DEBUG
andRELEASE
modeDescription
I think there is a problem when using Fill method with ImageBrush. When we use a rectangle for an image, squares are always drawn.
Steps to Reproduce
img.Fill(new ImageBrush(frameImage), new RectangleF(Convert.ToInt32(0), Convert.ToInt32(0), Convert.ToInt32(2000), Convert.ToInt32(2000)));
ImageBrush (frameImage):
Result:
I think the problem is in Apply method of ImageBrush class. I think Height should be used for sourceY calculation and not Width.
System Configuration