-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
| var croppedImage = new Rectangle(pixelRatio * element.Location.X, pixelRatio * element.Location.Y, pixelRatio * element.Size.Width, pixelRatio * element.Size.Height); screenshot = screenshot.Clone(croppedImage, screenshot.PixelFormat); |
This line will throw a critical exception if the element overflows page, because it is attempting to crop more (element size) than the size of the bitmap (page size). See: https://stackoverflow.com/questions/199468/c-sharp-image-clone-out-of-memory-exception
It might be beneficial to restrict the max size of the crop to bitmap size to avoid this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels