-
Hi, I have the code below that I use to convert a color image to black and white and then trim away the black borders around the page. The reason why I add the black border is to prevent a white page getting trimmed to almost nothing. Is it somehow possible to get the information that is trimmed of the page so that I also can do that with the original color image (that is just a photo of a piece of paper)? I can do it on the color image for the deskew option because this report back the angle that is has deskewed my image. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
You can use the |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Got it I need to get the Page.X and Page.Y and overrule that in the BoundingBox, this way I get exactly what I want. Image.Trim(new Percentage(0));
_boundingBox = Image.BoundingBox;
_boundingBox.X = Image.Page.X;
_boundingBox.Y = Image.Page.Y;
OriginalImage.Crop(_boundingBox);
OriginalImage.Write(new FileInfo("d:\\test.jpg")); |
Beta Was this translation helpful? Give feedback.
Got it I need to get the Page.X and Page.Y and overrule that in the BoundingBox, this way I get exactly what I want.