![]() |
Re: OCR für Arme, und ich bin noch ärmer
Zitat:
hier noch 2 Zeilen damit es auch unter Vista mit Delphi 2009 läuft:
Delphi-Quellcode:
unit Main;
... procedure TSimpleOCR.Init(Font: TFont); var Alphabet: string; ch: Char; begin for ch := #32 to #126 do // <-- Edit 1: statt #255 Alphabet:= Alphabet + ch; Init(Alphabet, Font); end; ... function TSimpleOCR.BitmapFromText(const S: string): TBitmap; begin Result:= TBitmap.Create; Result.PixelFormat := pf1bit; // <-- Edit 2: Zeile eingefügt -> Cleartype/Antialiasing aus Result.Canvas.Font:= FFont; with Result.Canvas.TextExtent(S) do Result.SetSize(cx, cy); Result.Canvas.TextOut(0, 0, S); end; ... |
Alle Zeitangaben in WEZ +1. Es ist jetzt 20:04 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz