We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Setting DotsPerInches in TiffOptions

How can i set the dotsperinches value in tiff option?


var tiffOption = new Aspose.Imaging.ImageOptions.TiffOptions
{
Compression = TiffCompressions.CcittFax4,
BitsPerSample = 1
};
This is the current code, how can i add the dotsperinches value of

DotsPerInchX=100
DotsPerInchY=100

Thanks in advance

Hi Hariharan,


Thank you for contacting Aspose support.

Please note that DPI (Dots per Inch) or PPI (Pixels per Inch) are the units of resolution. You may set the resolution for the TiffOptions class using the ResolutionSettings property. Please check the following piece of code for your reference.

C#

TiffOptions tiffOptions = new TiffOptions();
tiffOptions.Compression = TiffCompressions.CcittFax4;
tiffOptions.ResolutionUnit = TiffResolutionUnits.Inch;
tiffOptions.ResolutionSettings = new ResolutionSetting(100, 100);

Thank you Babar.raza for helping us.

Hi Hariharan,


We’re glad we could help. Please feel free to contact us back in case you need our further assistance with Aspose APIs.