Hi,
Hi Aravind,
I have observed your requirements and like to share that any image saved in the format tiff with a color depth of 24 bit can be as follows:
TiffOptions tiffOptions = new TiffOptions(TiffExpectedFormat.TiffJpegRgb)
image.Save(destFile, tiffOptions);
Can you please share your working sample code that what you are trying to achieve so that I may help you further.
Many Thanks,
Hi,
Hi Aravind,
I have observed the generated output and have consulted our product team in this regard as well. Moreover, I am unable to use the sample code shared by you as well. I suggest you to please try using following TiffOptions in your application and observe the results. If there is still an issue then please share the working sample project with us for further investigation on our end.
TiffOptions options = new TiffOptions(TiffExpectedFormat.TiffJpegYCbCr);
Many Thanks,
Hi,
Hi Aravind,
I have observed the information shared by you and have created an issue with ID IMAGINGNET-2312 in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be fixed.
We are sorry for your inconvenience,
Hi,
The issue is the YCbCrSubsampling tag, which should be 2 SHORT (16-bit unsigned) values, with 2 BYTE or LONG values also being valid.
In this image this tag has 2 SHORT (16-bit signed) values, which isn’t valid.
In addition, the ReferenceBlackWhite tag, which is required for a class Y TIFF, is missing (this is treated as a warning by Trapeze, not an error).
we are working to a very tight schedule , how much time will it take to resolve this issue?
Hi Aravind,
Thank you for sharing the additional information. I have update the information in associated ticket. I also like to add here that issue has just been logged and our product will schedule and log the issue as soon as possible on its due turn. We will share the good news with you when it will be shared by our product team.
Many Thanks,
@ARAVINDDSRC,
Our product team has investigated the issue using latest Aspose.Imaging for .NET 17.11 and Aspose.Pdf on our end. We have tried to convert Pdf to Tiff using the following code which is very similar to one you have shared earlier.
/// <summary>
/// Saves Pdf to Tiff with Jpeg compression and YCbCr color format.
/// </summary>
private void SavePdfToTiffJpegYCbCr(string pdfPath, string tiffPath)
{
string licensePath = @"c:\aspose.imaging.net\testdata\license\Aspose.Total.lic";
Aspose.Pdf.License pdfLicense = new Aspose.Pdf.License();
pdfLicense.SetLicense(licensePath);
Aspose.Imaging.License imagingLicense = new Aspose.Imaging.License();
imagingLicense.SetLicense(licensePath);
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(pdfPath);
Aspose.Pdf.Devices.TiffSettings tiffSettings = new Aspose.Pdf.Devices.TiffSettings
{
Compression = Aspose.Pdf.Devices.CompressionType.LZW,
Depth = Aspose.Pdf.Devices.ColorDepth.Default,
SkipBlankPages = false
};
Aspose.Pdf.Devices.Resolution resolution = new Aspose.Pdf.Devices.Resolution(96);
Aspose.Pdf.Devices.TiffDevice tiffDevice = new Aspose.Pdf.Devices.TiffDevice(resolution, tiffSettings);
using (Stream tiffStream = new MemoryStream())
{
tiffDevice.Process(pdfDocument, tiffStream);
tiffStream.Seek(0, SeekOrigin.Begin);
using (Image image = Image.Load(tiffStream))
{
Aspose.Imaging.ImageOptions.TiffOptions tiffOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Aspose.Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.TiffJpegYCbCr);
tiffOptions.ResolutionSettings = new ResolutionSetting(96.0, 96.0);
using (Stream tiffJpegYCbCrStream = new FileStream(tiffPath, FileMode.Create))
{
image.Save(tiffJpegYCbCrStream, tiffOptions);
}
}
}
}
We have got a well-formed valid output Tiff image as you can see from attached jhove_stat.txt. Can you please try to use the above code to get valid Tiff with Jpeg compression and YCbCr color format:
SavePdfToTiffJpegYCbCr("6031.pdf", "6031_YCbCr Out.tiff");
Then check it for correctness with JHove and provide your feedback please. At the moment we are unable to reproduce the bug on our side.
jhove_stat.txt.zip (1.9 KB)
6031_YCbCr Out.tiff.zip (2.7 MB)
The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.