Hi,
I have tried to convert bmp to tiff, when i opend the file via picass,its says invalid image.,also attached the code used and file use.
using (var image = global::Aspose.Imaging.Image.Load(inputFilePath))
{
var exportImageOption = new TiffOptions(TiffExpectedFormat.Default)
{
BitsPerSample = new ushort[] { 8, 8, 8 },
Compression = TiffCompressions.Lzw,
Photometric = TiffPhotometrics.Rgb
};
//Sets DPI (dots per inch)
if (argModel.dpiToAdjust != null)
{
exportImageOption.ResolutionUnit = TiffResolutionUnits.Inch;
exportImageOption.Xresolution = new TiffRational(Convert.ToUInt32(argModel.dpiToAdjust.Value));
exportImageOption.Yresolution = new TiffRational(Convert.ToUInt32(argModel.dpiToAdjust.Value));
}
//Sets SCALE (width and height)
if (argModel.imgToScale != null || argModel.imageToScaleHeight != null && argModel.imageToScaleWidth != null)
{
var height = 0;
var width = 0;
if (argModel.imgToScale != null)
{
height = argModel.imgToScale.Value;
width = argModel.imgToScale.Value;
}
if (argModel.imageToScaleHeight != null && argModel.imageToScaleWidth != null)
{
height = argModel.imageToScaleHeight.Value;
width = argModel.imageToScaleWidth.Value;
}
image.Resize(width, height);
}
image.Save(outputFilePath, exportImageOption);
}
Thanks in advance.