Hi
I want to be able to resize and optimize an image
for web, ebooks etc.
Do you have a component for this?
if yes, can you provide some sample code on how to
use it to resize and optimize images (JPG, GIFS, PNG etc)
Hi Nitin,
Thank you for considering Aspose products.
Aspose.Imaging provides means to re-size images of type Gif, Tiff, Png and Jpeg. Please check the below provided code snippet for your reference.
C#
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(“DSC01768.jpg”))
{
int width = image.Width - 200;
int height = image.Height - 200;
image.Resize(width, height, ResizeType.CenterToCenter);
image.Save(“DSC01768_resize.jpg”);
}
Aspose.Imaging API also offers an overloaded version of Image.Resize method that does not accept the third parameter (ResizeType).
Please feel free to write back in case you need our further assistance.
Hi Nitin,
That's great!
Thank you so much, I will check this out!