Problem using deskew with output to blob
Posted: 2016-02-16T11:42:52-07:00
I'm taking a greyscale TIFF image from a scanner and then using ImageMagickObject to tidy the image prior to running Tesseract. Problem is that I get "Fatal User Error 1002:", "Deadlock due to omp_set_lock being called on lock already owned by thread". When I click OK to dismiss the error it crashes and closes Excel.
The image is a greyscale TIFF at 8.5" x 11", at 300DPI. Convert with deskew to a file takes about 10-12 seconds.
Problem only seems to show on the large image deskew to a blob output, using "logo:" "-deskew" "40%" with output to the blob is OK.
Can anyone offer any suggestions?
The line that throws the error is:-
The following all work OK:-
But the following which only performs the deskew with output to a blob throws the same error:-
The image is a greyscale TIFF at 8.5" x 11", at 300DPI. Convert with deskew to a file takes about 10-12 seconds.
Problem only seems to show on the large image deskew to a blob output, using "logo:" "-deskew" "40%" with output to the blob is OK.
Can anyone offer any suggestions?
The line that throws the error is:-
Code: Select all
IMimage1 = Array("TIFF:") ' Specify the image type
sArg = objIM.Convert(sInterFName, "-crop", sArea, "+repage", "-shave", sBorder, _
"-bordercolor", "white", "-border", sBorder, _
"-white-threshold", FormatPercent(dWhiteThreshold, 0), "-deskew", "40%", IMimage1)
Code: Select all
Call objIM.Convert(sInterFName, "-crop", sArea, "+repage", "-shave", sBorder, _
"-bordercolor", "white", "-border", sBorder, _
"-white-threshold", FormatPercent(dWhiteThreshold, 0), "-deskew", "40%", sPartFName)
Call objIM.Convert(sInterFName, "-crop", sArea, "+repage", "-shave", sBorder, _
"-bordercolor", "white", "-border", sBorder, _
"-white-threshold", FormatPercent(dWhiteThreshold, 0), sPartFName)
IMimage1 = Array("TIFF:") ' Specify the image type
Call objIM.Convert(sInterFName, "-crop", sArea, "+repage", "-shave", sBorder, _
"-bordercolor", "white", "-border", sBorder, _
"-white-threshold", FormatPercent(dWhiteThreshold, 0), IMimage1)
IMimage2 = Array("TIFF:") ' Specify the image type
sArg = objIM.Convert(sPartFName, IMimage2)
sArg = objIM.Convert(sPartFName, "-deskew", "40%", sPartFName)
IMimage2 = Array("TIFF:") ' Specify the image type
sArg = objIM.Convert("logo:", "-deskew", "40%", IMimage2)
Code: Select all
IMimage2 = Array("TIFF:") ' Specify the image type
sArg = objIM.Convert(sPartFName, "-deskew", "40%", IMimage2)