mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +01:00
[TextExtractor]Check for CJK Language before combining OCR result to string (#20415)
This commit is contained in:
@@ -137,9 +137,24 @@ internal class ImageMethods
|
|||||||
|
|
||||||
if (singlePoint == null)
|
if (singlePoint == null)
|
||||||
{
|
{
|
||||||
foreach (OcrLine line in ocrResult.Lines)
|
if (isCJKLang == false)
|
||||||
{
|
{
|
||||||
text.AppendLine(line.Text);
|
foreach (OcrLine line in ocrResult.Lines)
|
||||||
|
{
|
||||||
|
text.AppendLine(line.Text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach (OcrLine ocrLine in ocrResult.Lines)
|
||||||
|
{
|
||||||
|
foreach (OcrWord ocrWord in ocrLine.Words)
|
||||||
|
{
|
||||||
|
_ = text.Append(ocrWord.Text);
|
||||||
|
}
|
||||||
|
|
||||||
|
text.Append(Environment.NewLine);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user