Hi I am reading in a byte [] into a image and having trouble cropping the image after inserting it into the aspose.cells.worksheet. The image being read into the stream needs to crop to the bottom 4th of the page. See code below.
Hi,
Hi,
Console.WriteLine(pic.FormatPicture.TopCrop);
Console.WriteLine(pic.FormatPicture.BottomCrop);
Console.WriteLine(pic.FormatPicture.RightCrop);
Console.WriteLine(pic.FormatPicture.LeftCrop);
Thanks again for the quick response.
Hi,
Hi,
Thanks for your posting and using Aspose.Cells.
The value of crop should be a ratio of the image’s width or
height.
Please see the following code.
C#
pic.FormatPicture.TopCrop = 450.0F/
pic.Height;
pic.FormatPicture.BottomCrop = 85.0F/
pic.Height;
pic.FormatPicture.RightCrop = 40.0F/
pic.Width;
pic.FormatPicture.LeftCrop = 5.0F / pic.Width;