Moved image scaling logic into SGTextRecognizer