I’m Trying to do a correction in some images (.TIF) that are skew, but having somo issues.
Using Aspose.OCR -> 17.6.0.0
some images are not being corrected.
the images after being process are converted into Black and White images.
If I use a image that was not scanned, I got this error Unable to cast object of type ‘Aspose.Imaging.FileFormats.Dng.DngImage’ to type 'Aspose.Imaging.FileFormats.Tiff.TiffImage
If the image is blank and not skew it change process change the orientation
the code I’m using is, and I attached the images I’m using for testing, just I’m using the images as .TIF
OmrImage omrImage = OmrImage.Load(sourceFilePath);
System.Drawing.Rectangle area = new System.Drawing.Rectangle(0, 0, omrImage.Width, omrImage.Height);
GrayscaleAlgorithm grayscaleAlgorithm = new GrayscaleAlgorithm();
grayscaleAlgorithm.Process(omrImage, area);
AverageThresholdAlgorithm averageThresholdAlgorithm = new AverageThresholdAlgorithm();
averageThresholdAlgorithm.Process(omrImage, area);
SkewCorrectionAlgorithm skewCorrectionAlgorithm = new SkewCorrectionAlgorithm();
skewCorrectionAlgorithm.Process(ref omrImage, area);
omrImage.AsBitmap().Save(destinationFilePath);
We have investigated the issue at our end. Initial investigation shows that the issue persists for points 1,2 and 3. The issue has been logged into our system with ID OMRNET-551 for further investigation by our Product team. We’ll update you here once there is some information or a fix version available in this regard.
For point #3, DNG image format is not supported. Please share a sample of DNG image and sample code snippet with us. We will look into it and update you about our findings.
This part of your inquiry is related to Aspose.Imaging. I am moving this query to the respective forum. Where a member from the support team will answer you accordingly.
In the above reference you have mentioned DNG image format. The image you have shared is a TIFF image. Please share the DNG image that is producing error. We have tested the “Point3.tif” image file and we are unable to reproduce the error as mentioned above.