Free Support Forum - aspose.com

Compress Image

Hi,

We are trying to compress the picture in Word file for disk space reduction. This morning, I tested picture compression by manual and the program which used your code above, and the test results as below:

The source Word file size is 289KB, and need compress to 96DPI.

After compressed by program, its size is reduced to 197KB.

But manually compressed by 'Compress Pictures' functionality, its size is reduced to 59KB.

Obviously, compression by manual is much better than program. May I have your help to get the better compression by program? and we are using ASPOSE Word, is there any function to implement it?

Thanks in advance!

Hi
Major,


Thanks for your inquiry. I think you can try specifying tiff compression type and resolution of output image. Please see the following API page:
http://www.aspose.com/docs/display/wordsnet/ImageSaveOptions+Members

Moreover, please see below a sample code snippet:

Document doc = new
Document(MyDir + “Rendering.doc”);

ImageSaveOptions options = new ImageSaveOptions(SaveFormat.Png);

options.Resolution = 300;

options.TiffCompression = TiffCompression.Ccitt4;

doc.Save(MyDir + "Rendering.SaveToImageResolution Out.png", options);


I hope, this will help.

Best Regards,

Hi Awais,

Thank a lot for help.

We want to compress the pictures with low dpi in Word file, like the Word function 'Compress Pictures' as shown in attached screeshot. Don't change Word file format.

How can we do using code?

Major G

Hi,


Thanks for your inquiry. I have logged a new feature request in our bug tracking system. The feature ID is WORDSNET-7007. Your request has been linked to this feature and you will be notified as soon as it is supported. Sorry for the inconvenience.

Best Regards,

Hi,


Thanks for your patience. In the mean time while you’re waiting for the support of this feature, I would suggest you please try using the ‘CompressImages’ project available in Aspose.Words for .NET Samples below. I hope, this will help in compressing the images in your document.
http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/entry187174.aspx

Best Regards,

Hi,


Thanks for your patience. It is to update you that our development team has finished working on your issue (WORDSNET-7007) and they have closed this issue as ‘Not a Bug’. Please use the workaround code that is suggested in my previous post. If we can help you with anything else, please feel free to ask.

Best regards,